From 4b5e25d3ae1016c14abaf02d4b27b9acf2d3fca0 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 31 Oct 2018 14:17:29 -0700 Subject: [PATCH 1/6] [AutoPR devtestlabs/resource-manager] Add Devtestlabs/2018-09-15 (#3717) * Generated from 6af191447abf057ee3216d1f7794014d19256ece Update go and ruby readme * Packaging update of azure-mgmt-devtestlabs --- azure-mgmt-devtestlabs/MANIFEST.in | 3 + .../mgmt/devtestlabs/dev_test_labs_client.py | 18 +- .../azure/mgmt/devtestlabs/models/__init__.py | 457 ++++++--- .../devtestlabs/models/applicable_schedule.py | 8 +- .../models/applicable_schedule_fragment.py | 33 +- .../applicable_schedule_fragment_py3.py | 38 + .../models/applicable_schedule_py3.py | 59 ++ .../models/apply_artifacts_request.py | 6 +- .../models/apply_artifacts_request_py3.py | 29 + .../mgmt/devtestlabs/models/arm_template.py | 9 +- .../devtestlabs/models/arm_template_info.py | 8 +- .../models/arm_template_info_py3.py | 32 + .../arm_template_parameter_properties.py | 8 +- ..._template_parameter_properties_fragment.py | 32 + ...plate_parameter_properties_fragment_py3.py | 32 + .../arm_template_parameter_properties_py3.py | 32 + .../devtestlabs/models/arm_template_py3.py | 90 ++ .../azure/mgmt/devtestlabs/models/artifact.py | 4 +- .../artifact_deployment_status_properties.py | 10 +- ...t_deployment_status_properties_fragment.py | 10 +- ...ployment_status_properties_fragment_py3.py | 38 + ...tifact_deployment_status_properties_py3.py | 38 + .../models/artifact_install_properties.py | 20 +- .../artifact_install_properties_fragment.py | 20 +- ...rtifact_install_properties_fragment_py3.py | 55 + .../models/artifact_install_properties_py3.py | 55 + .../models/artifact_parameter_properties.py | 8 +- .../artifact_parameter_properties_fragment.py | 8 +- ...ifact_parameter_properties_fragment_py3.py | 32 + .../artifact_parameter_properties_py3.py | 32 + .../mgmt/devtestlabs/models/artifact_py3.py | 88 ++ .../devtestlabs/models/artifact_source.py | 34 +- .../models/artifact_source_fragment.py | 54 +- .../models/artifact_source_fragment_py3.py | 63 ++ .../devtestlabs/models/artifact_source_py3.py | 100 ++ .../models/attach_disk_properties.py | 6 +- .../models/attach_disk_properties_py3.py | 29 + .../models/attach_new_data_disk_options.py | 10 +- .../attach_new_data_disk_options_fragment.py | 37 + ...tach_new_data_disk_options_fragment_py3.py | 37 + .../attach_new_data_disk_options_py3.py | 37 + .../models/bulk_creation_parameters.py | 6 +- .../bulk_creation_parameters_fragment.py | 28 + .../bulk_creation_parameters_fragment_py3.py | 28 + .../models/bulk_creation_parameters_py3.py | 28 + .../devtestlabs/models/compute_data_disk.py | 12 +- .../models/compute_data_disk_fragment.py | 12 +- .../models/compute_data_disk_fragment_py3.py | 41 + .../models/compute_data_disk_py3.py | 41 + .../models/compute_vm_instance_view_status.py | 10 +- ...ompute_vm_instance_view_status_fragment.py | 10 +- ...te_vm_instance_view_status_fragment_py3.py | 36 + .../compute_vm_instance_view_status_py3.py | 36 + .../models/compute_vm_properties.py | 18 +- .../models/compute_vm_properties_fragment.py | 18 +- .../compute_vm_properties_fragment_py3.py | 55 + .../models/compute_vm_properties_py3.py | 54 + .../models/cost_threshold_properties.py | 14 +- .../models/cost_threshold_properties_py3.py | 51 + .../mgmt/devtestlabs/models/custom_image.py | 50 +- .../models/custom_image_fragment.py | 71 ++ .../models/custom_image_fragment_py3.py | 71 ++ .../models/custom_image_properties_custom.py | 16 +- ...custom_image_properties_custom_fragment.py | 37 + ...om_image_properties_custom_fragment_py3.py | 37 + .../custom_image_properties_custom_py3.py | 43 + .../custom_image_properties_from_plan.py | 38 + ...tom_image_properties_from_plan_fragment.py | 38 + ...image_properties_from_plan_fragment_py3.py | 38 + .../custom_image_properties_from_plan_py3.py | 38 + .../models/custom_image_properties_from_vm.py | 10 +- ...ustom_image_properties_from_vm_fragment.py | 37 + ...m_image_properties_from_vm_fragment_py3.py | 37 + .../custom_image_properties_from_vm_py3.py | 36 + .../devtestlabs/models/custom_image_py3.py | 106 ++ .../models/data_disk_properties.py | 10 +- .../models/data_disk_properties_fragment.py | 41 + .../data_disk_properties_fragment_py3.py | 41 + .../models/data_disk_properties_py3.py | 41 + .../models/data_disk_storage_type_info.py | 33 + .../data_disk_storage_type_info_fragment.py | 33 + ...ata_disk_storage_type_info_fragment_py3.py | 33 + .../models/data_disk_storage_type_info_py3.py | 33 + .../mgmt/devtestlabs/models/day_details.py | 6 +- .../models/day_details_fragment.py | 6 +- .../models/day_details_fragment_py3.py | 28 + .../devtestlabs/models/day_details_py3.py | 28 + .../models/detach_data_disk_properties.py | 6 +- .../models/detach_data_disk_properties_py3.py | 29 + .../models/detach_disk_properties.py | 6 +- .../models/detach_disk_properties_py3.py | 29 + .../models/dev_test_labs_client_enums.py | 56 +- .../azure/mgmt/devtestlabs/models/disk.py | 32 +- .../mgmt/devtestlabs/models/disk_fragment.py | 60 ++ .../devtestlabs/models/disk_fragment_py3.py | 60 ++ .../azure/mgmt/devtestlabs/models/disk_py3.py | 97 ++ .../devtestlabs/models/dtl_environment.py | 22 +- .../models/dtl_environment_fragment.py | 38 + .../models/dtl_environment_fragment_py3.py | 38 + .../devtestlabs/models/dtl_environment_py3.py | 81 ++ .../environment_deployment_properties.py | 8 +- ...ironment_deployment_properties_fragment.py | 33 + ...ment_deployment_properties_fragment_py3.py | 33 + .../environment_deployment_properties_py3.py | 33 + .../models/evaluate_policies_properties.py | 14 +- .../evaluate_policies_properties_py3.py | 40 + .../models/evaluate_policies_request.py | 6 +- .../models/evaluate_policies_request_py3.py | 29 + .../models/evaluate_policies_response.py | 6 +- .../models/evaluate_policies_response_py3.py | 28 + .../azure/mgmt/devtestlabs/models/event.py | 6 +- .../mgmt/devtestlabs/models/event_fragment.py | 6 +- .../devtestlabs/models/event_fragment_py3.py | 30 + .../mgmt/devtestlabs/models/event_py3.py | 30 + .../export_resource_usage_parameters.py | 8 +- .../export_resource_usage_parameters_py3.py | 35 + .../devtestlabs/models/external_subnet.py | 8 +- .../models/external_subnet_fragment.py | 8 +- .../models/external_subnet_fragment_py3.py | 32 + .../devtestlabs/models/external_subnet_py3.py | 32 + .../azure/mgmt/devtestlabs/models/formula.py | 28 +- .../devtestlabs/models/formula_fragment.py | 48 + .../models/formula_fragment_py3.py | 48 + .../models/formula_properties_from_vm.py | 6 +- .../formula_properties_from_vm_fragment.py | 29 + ...formula_properties_from_vm_fragment_py3.py | 29 + .../models/formula_properties_from_vm_py3.py | 29 + .../mgmt/devtestlabs/models/formula_py3.py | 85 ++ .../mgmt/devtestlabs/models/gallery_image.py | 23 +- .../devtestlabs/models/gallery_image_py3.py | 83 ++ .../models/gallery_image_reference.py | 14 +- .../gallery_image_reference_fragment.py | 14 +- .../gallery_image_reference_fragment_py3.py | 44 + .../models/gallery_image_reference_py3.py | 44 + .../models/generate_arm_template_request.py | 12 +- .../generate_arm_template_request_py3.py | 43 + .../models/generate_upload_uri_parameter.py | 6 +- .../generate_upload_uri_parameter_py3.py | 28 + .../models/generate_upload_uri_response.py | 6 +- .../generate_upload_uri_response_py3.py | 28 + .../mgmt/devtestlabs/models/hour_details.py | 6 +- .../models/hour_details_fragment.py | 6 +- .../models/hour_details_fragment_py3.py | 28 + .../devtestlabs/models/hour_details_py3.py | 28 + .../devtestlabs/models/identity_properties.py | 12 +- .../models/identity_properties_py3.py | 40 + .../import_lab_virtual_machine_request.py | 35 + .../import_lab_virtual_machine_request_py3.py | 35 + .../devtestlabs/models/inbound_nat_rule.py | 10 +- .../models/inbound_nat_rule_fragment.py | 10 +- .../models/inbound_nat_rule_fragment_py3.py | 42 + .../models/inbound_nat_rule_py3.py | 42 + .../azure/mgmt/devtestlabs/models/lab.py | 80 +- .../models/lab_announcement_properties.py | 64 ++ .../lab_announcement_properties_fragment.py | 47 + ...ab_announcement_properties_fragment_py3.py | 47 + .../models/lab_announcement_properties_py3.py | 64 ++ .../azure/mgmt/devtestlabs/models/lab_cost.py | 28 +- .../models/lab_cost_details_properties.py | 10 +- .../models/lab_cost_details_properties_py3.py | 37 + .../mgmt/devtestlabs/models/lab_cost_py3.py | 97 ++ .../models/lab_cost_summary_properties.py | 6 +- .../models/lab_cost_summary_properties_py3.py | 28 + .../mgmt/devtestlabs/models/lab_fragment.py | 77 +- .../devtestlabs/models/lab_fragment_py3.py | 78 ++ .../azure/mgmt/devtestlabs/models/lab_py3.py | 165 +++ .../models/lab_resource_cost_properties.py | 22 +- .../lab_resource_cost_properties_py3.py | 63 ++ .../models/lab_support_properties.py | 34 + .../models/lab_support_properties_fragment.py | 34 + .../lab_support_properties_fragment_py3.py | 34 + .../models/lab_support_properties_py3.py | 34 + .../azure/mgmt/devtestlabs/models/lab_vhd.py | 6 +- .../mgmt/devtestlabs/models/lab_vhd_py3.py | 28 + .../devtestlabs/models/lab_virtual_machine.py | 112 +- .../lab_virtual_machine_creation_parameter.py | 109 +- ...ual_machine_creation_parameter_fragment.py | 192 ++++ ...machine_creation_parameter_fragment_py3.py | 192 ++++ ..._virtual_machine_creation_parameter_py3.py | 192 ++++ .../models/lab_virtual_machine_fragment.py | 127 +-- .../lab_virtual_machine_fragment_py3.py | 177 ++++ .../models/lab_virtual_machine_py3.py | 221 ++++ .../mgmt/devtestlabs/models/linux_os_info.py | 6 +- .../models/linux_os_info_fragment.py | 30 + .../models/linux_os_info_fragment_py3.py | 30 + .../devtestlabs/models/linux_os_info_py3.py | 30 + .../models/network_interface_properties.py | 22 +- .../network_interface_properties_fragment.py | 22 +- ...twork_interface_properties_fragment_py3.py | 65 ++ .../network_interface_properties_py3.py | 65 ++ .../models/notification_channel.py | 34 +- .../models/notification_channel_fragment.py | 54 +- .../notification_channel_fragment_py3.py | 49 + .../models/notification_channel_py3.py | 86 ++ .../models/notification_settings.py | 24 +- .../models/notification_settings_fragment.py | 24 +- .../notification_settings_fragment_py3.py | 49 + .../models/notification_settings_py3.py | 49 + .../devtestlabs/models/notify_parameters.py | 8 +- .../models/notify_parameters_py3.py | 34 + .../devtestlabs/models/operation_error.py | 8 +- .../devtestlabs/models/operation_error_py3.py | 32 + .../devtestlabs/models/operation_metadata.py | 8 +- .../models/operation_metadata_display.py | 12 +- .../models/operation_metadata_display_py3.py | 41 + .../models/operation_metadata_py3.py | 32 + .../devtestlabs/models/operation_result.py | 10 +- .../models/operation_result_py3.py | 48 + .../mgmt/devtestlabs/models/parameter_info.py | 8 +- .../devtestlabs/models/parameter_info_py3.py | 32 + .../models/parameters_value_file_info.py | 8 +- .../models/parameters_value_file_info_py3.py | 32 + .../percentage_cost_threshold_properties.py | 6 +- ...ercentage_cost_threshold_properties_py3.py | 28 + .../azure/mgmt/devtestlabs/models/policy.py | 32 +- .../devtestlabs/models/policy_fragment.py | 52 +- .../devtestlabs/models/policy_fragment_py3.py | 60 ++ .../mgmt/devtestlabs/models/policy_py3.py | 97 ++ .../devtestlabs/models/policy_set_result.py | 8 +- .../models/policy_set_result_py3.py | 34 + .../devtestlabs/models/policy_violation.py | 8 +- .../models/policy_violation_py3.py | 32 + .../azure/mgmt/devtestlabs/models/port.py | 8 +- .../mgmt/devtestlabs/models/port_fragment.py | 8 +- .../devtestlabs/models/port_fragment_py3.py | 34 + .../azure/mgmt/devtestlabs/models/port_py3.py | 34 + .../mgmt/devtestlabs/models/rdp_connection.py | 28 + .../devtestlabs/models/rdp_connection_py3.py | 28 + .../resize_lab_virtual_machine_properties.py | 28 + ...size_lab_virtual_machine_properties_py3.py | 28 + .../azure/mgmt/devtestlabs/models/resource.py | 8 +- .../mgmt/devtestlabs/models/resource_py3.py | 53 + .../models/retarget_schedule_properties.py | 8 +- .../retarget_schedule_properties_py3.py | 34 + .../azure/mgmt/devtestlabs/models/schedule.py | 34 +- .../models/schedule_creation_parameter.py | 74 ++ .../schedule_creation_parameter_fragment.py | 76 ++ ...chedule_creation_parameter_fragment_py3.py | 76 ++ .../models/schedule_creation_parameter_py3.py | 74 ++ .../devtestlabs/models/schedule_fragment.py | 54 +- .../models/schedule_fragment_py3.py | 67 ++ .../mgmt/devtestlabs/models/schedule_py3.py | 102 ++ .../azure/mgmt/devtestlabs/models/secret.py | 20 +- .../devtestlabs/models/secret_fragment.py | 31 + .../devtestlabs/models/secret_fragment_py3.py | 31 + .../mgmt/devtestlabs/models/secret_py3.py | 63 ++ .../mgmt/devtestlabs/models/service_fabric.py | 76 ++ .../models/service_fabric_fragment.py | 37 + .../models/service_fabric_fragment_py3.py | 37 + .../models/service_fabric_paged.py | 27 + .../devtestlabs/models/service_fabric_py3.py | 76 ++ .../mgmt/devtestlabs/models/service_runner.py | 6 +- .../devtestlabs/models/service_runner_py3.py | 52 + .../shared_public_ip_address_configuration.py | 6 +- ...ublic_ip_address_configuration_fragment.py | 6 +- ...c_ip_address_configuration_fragment_py3.py | 30 + ...red_public_ip_address_configuration_py3.py | 30 + .../models/shutdown_notification_content.py | 34 +- .../shutdown_notification_content_py3.py | 78 ++ .../azure/mgmt/devtestlabs/models/subnet.py | 10 +- .../devtestlabs/models/subnet_fragment.py | 10 +- .../devtestlabs/models/subnet_fragment_py3.py | 39 + .../devtestlabs/models/subnet_override.py | 16 +- .../models/subnet_override_fragment.py | 16 +- .../models/subnet_override_fragment_py3.py | 57 ++ .../devtestlabs/models/subnet_override_py3.py | 57 ++ .../mgmt/devtestlabs/models/subnet_py3.py | 39 + ..._shared_public_ip_address_configuration.py | 6 +- ...ublic_ip_address_configuration_fragment.py | 6 +- ...c_ip_address_configuration_fragment_py3.py | 29 + ...red_public_ip_address_configuration_py3.py | 29 + .../models/target_cost_properties.py | 16 +- .../models/target_cost_properties_py3.py | 51 + .../devtestlabs/models/update_resource.py | 28 + .../devtestlabs/models/update_resource_py3.py | 28 + .../azure/mgmt/devtestlabs/models/user.py | 22 +- .../mgmt/devtestlabs/models/user_fragment.py | 42 +- .../devtestlabs/models/user_fragment_py3.py | 35 + .../mgmt/devtestlabs/models/user_identity.py | 14 +- .../models/user_identity_fragment.py | 14 +- .../models/user_identity_fragment_py3.py | 49 + .../devtestlabs/models/user_identity_py3.py | 49 + .../azure/mgmt/devtestlabs/models/user_py3.py | 72 ++ .../devtestlabs/models/user_secret_store.py | 8 +- .../models/user_secret_store_fragment.py | 8 +- .../models/user_secret_store_fragment_py3.py | 32 + .../models/user_secret_store_py3.py | 32 + .../devtestlabs/models/virtual_network.py | 33 +- .../models/virtual_network_fragment.py | 51 +- .../models/virtual_network_fragment_py3.py | 45 + .../devtestlabs/models/virtual_network_py3.py | 88 ++ .../mgmt/devtestlabs/models/week_details.py | 8 +- .../models/week_details_fragment.py | 8 +- .../models/week_details_fragment_py3.py | 33 + .../devtestlabs/models/week_details_py3.py | 33 + .../devtestlabs/models/windows_os_info.py | 6 +- .../models/windows_os_info_fragment.py | 31 + .../models/windows_os_info_fragment_py3.py | 31 + .../devtestlabs/models/windows_os_info_py3.py | 31 + .../mgmt/devtestlabs/operations/__init__.py | 4 + .../operations/arm_templates_operations.py | 30 +- .../operations/artifact_sources_operations.py | 56 +- .../operations/artifacts_operations.py | 39 +- .../operations/costs_operations.py | 22 +- .../operations/custom_images_operations.py | 215 ++-- .../operations/disks_operations.py | 324 +++--- .../operations/environments_operations.py | 220 ++-- .../operations/formulas_operations.py | 169 +++- .../operations/gallery_images_operations.py | 21 +- .../operations/global_schedules_operations.py | 183 ++-- .../devtestlabs/operations/labs_operations.py | 442 ++++---- .../notification_channels_operations.py | 64 +- .../mgmt/devtestlabs/operations/operations.py | 13 +- .../operations/policies_operations.py | 56 +- .../operations/policy_sets_operations.py | 13 +- .../operations/provider_operations.py | 14 +- .../operations/schedules_operations.py | 123 +-- .../operations/secrets_operations.py | 208 +++- .../service_fabric_schedules_operations.py | 521 ++++++++++ .../operations/service_fabrics_operations.py | 721 +++++++++++++ .../operations/service_runners_operations.py | 47 +- .../operations/users_operations.py | 183 ++-- .../virtual_machine_schedules_operations.py | 113 +-- .../operations/virtual_machines_operations.py | 956 ++++++++++++------ .../operations/virtual_networks_operations.py | 153 ++- .../azure/mgmt/devtestlabs/version.py | 2 +- 326 files changed, 13719 insertions(+), 2788 deletions(-) create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py create mode 100644 azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py diff --git a/azure-mgmt-devtestlabs/MANIFEST.in b/azure-mgmt-devtestlabs/MANIFEST.in index bb37a2723dae..6ceb27f7a96e 100644 --- a/azure-mgmt-devtestlabs/MANIFEST.in +++ b/azure-mgmt-devtestlabs/MANIFEST.in @@ -1 +1,4 @@ include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py index 48edf7d7c7fe..74bdf0ef0fdc 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/dev_test_labs_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -33,6 +33,8 @@ from .operations.disks_operations import DisksOperations from .operations.environments_operations import EnvironmentsOperations from .operations.secrets_operations import SecretsOperations +from .operations.service_fabrics_operations import ServiceFabricsOperations +from .operations.service_fabric_schedules_operations import ServiceFabricSchedulesOperations from .operations.virtual_machines_operations import VirtualMachinesOperations from .operations.virtual_machine_schedules_operations import VirtualMachineSchedulesOperations from .operations.virtual_networks_operations import VirtualNetworksOperations @@ -71,7 +73,7 @@ def __init__( self.subscription_id = subscription_id -class DevTestLabsClient(object): +class DevTestLabsClient(SDKClient): """The DevTest Labs Client. :ivar config: Configuration for client. @@ -117,6 +119,10 @@ class DevTestLabsClient(object): :vartype environments: azure.mgmt.devtestlabs.operations.EnvironmentsOperations :ivar secrets: Secrets operations :vartype secrets: azure.mgmt.devtestlabs.operations.SecretsOperations + :ivar service_fabrics: ServiceFabrics operations + :vartype service_fabrics: azure.mgmt.devtestlabs.operations.ServiceFabricsOperations + :ivar service_fabric_schedules: ServiceFabricSchedules operations + :vartype service_fabric_schedules: azure.mgmt.devtestlabs.operations.ServiceFabricSchedulesOperations :ivar virtual_machines: VirtualMachines operations :vartype virtual_machines: azure.mgmt.devtestlabs.operations.VirtualMachinesOperations :ivar virtual_machine_schedules: VirtualMachineSchedules operations @@ -136,10 +142,10 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = DevTestLabsClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(DevTestLabsClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2016-05-15' + self.api_version = '2018-09-15' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -183,6 +189,10 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.secrets = SecretsOperations( self._client, self.config, self._serialize, self._deserialize) + self.service_fabrics = ServiceFabricsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.service_fabric_schedules = ServiceFabricSchedulesOperations( + self._client, self.config, self._serialize, self._deserialize) self.virtual_machines = VirtualMachinesOperations( self._client, self.config, self._serialize, self._deserialize) self.virtual_machine_schedules = VirtualMachineSchedulesOperations( diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py index f45f9b878509..56d0fd0fe73f 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/__init__.py @@ -9,121 +9,302 @@ # regenerated. # -------------------------------------------------------------------------- -from .week_details import WeekDetails -from .day_details import DayDetails -from .hour_details import HourDetails -from .notification_settings import NotificationSettings -from .schedule import Schedule -from .applicable_schedule import ApplicableSchedule -from .week_details_fragment import WeekDetailsFragment -from .day_details_fragment import DayDetailsFragment -from .hour_details_fragment import HourDetailsFragment -from .notification_settings_fragment import NotificationSettingsFragment -from .schedule_fragment import ScheduleFragment -from .applicable_schedule_fragment import ApplicableScheduleFragment -from .artifact_parameter_properties import ArtifactParameterProperties -from .artifact_install_properties import ArtifactInstallProperties -from .apply_artifacts_request import ApplyArtifactsRequest -from .parameters_value_file_info import ParametersValueFileInfo -from .arm_template import ArmTemplate -from .arm_template_info import ArmTemplateInfo -from .arm_template_parameter_properties import ArmTemplateParameterProperties -from .artifact import Artifact -from .artifact_deployment_status_properties import ArtifactDeploymentStatusProperties -from .artifact_deployment_status_properties_fragment import ArtifactDeploymentStatusPropertiesFragment -from .artifact_parameter_properties_fragment import ArtifactParameterPropertiesFragment -from .artifact_install_properties_fragment import ArtifactInstallPropertiesFragment -from .artifact_source import ArtifactSource -from .artifact_source_fragment import ArtifactSourceFragment -from .attach_disk_properties import AttachDiskProperties -from .attach_new_data_disk_options import AttachNewDataDiskOptions -from .bulk_creation_parameters import BulkCreationParameters -from .compute_data_disk import ComputeDataDisk -from .compute_data_disk_fragment import ComputeDataDiskFragment -from .compute_vm_instance_view_status import ComputeVmInstanceViewStatus -from .compute_vm_instance_view_status_fragment import ComputeVmInstanceViewStatusFragment -from .compute_vm_properties import ComputeVmProperties -from .compute_vm_properties_fragment import ComputeVmPropertiesFragment -from .percentage_cost_threshold_properties import PercentageCostThresholdProperties -from .cost_threshold_properties import CostThresholdProperties -from .windows_os_info import WindowsOsInfo -from .linux_os_info import LinuxOsInfo -from .custom_image_properties_from_vm import CustomImagePropertiesFromVm -from .custom_image_properties_custom import CustomImagePropertiesCustom -from .custom_image import CustomImage -from .data_disk_properties import DataDiskProperties -from .detach_data_disk_properties import DetachDataDiskProperties -from .detach_disk_properties import DetachDiskProperties -from .disk import Disk -from .environment_deployment_properties import EnvironmentDeploymentProperties -from .dtl_environment import DtlEnvironment -from .evaluate_policies_properties import EvaluatePoliciesProperties -from .evaluate_policies_request import EvaluatePoliciesRequest -from .policy_violation import PolicyViolation -from .policy_set_result import PolicySetResult -from .evaluate_policies_response import EvaluatePoliciesResponse -from .event import Event -from .event_fragment import EventFragment -from .export_resource_usage_parameters import ExportResourceUsageParameters -from .external_subnet import ExternalSubnet -from .external_subnet_fragment import ExternalSubnetFragment -from .gallery_image_reference import GalleryImageReference -from .inbound_nat_rule import InboundNatRule -from .shared_public_ip_address_configuration import SharedPublicIpAddressConfiguration -from .network_interface_properties import NetworkInterfaceProperties -from .lab_virtual_machine_creation_parameter import LabVirtualMachineCreationParameter -from .formula_properties_from_vm import FormulaPropertiesFromVm -from .formula import Formula -from .gallery_image import GalleryImage -from .gallery_image_reference_fragment import GalleryImageReferenceFragment -from .parameter_info import ParameterInfo -from .generate_arm_template_request import GenerateArmTemplateRequest -from .generate_upload_uri_parameter import GenerateUploadUriParameter -from .generate_upload_uri_response import GenerateUploadUriResponse -from .identity_properties import IdentityProperties -from .inbound_nat_rule_fragment import InboundNatRuleFragment -from .lab import Lab -from .target_cost_properties import TargetCostProperties -from .lab_cost_summary_properties import LabCostSummaryProperties -from .lab_cost_details_properties import LabCostDetailsProperties -from .lab_resource_cost_properties import LabResourceCostProperties -from .lab_cost import LabCost -from .lab_fragment import LabFragment -from .lab_vhd import LabVhd -from .lab_virtual_machine import LabVirtualMachine -from .shared_public_ip_address_configuration_fragment import SharedPublicIpAddressConfigurationFragment -from .network_interface_properties_fragment import NetworkInterfacePropertiesFragment -from .lab_virtual_machine_fragment import LabVirtualMachineFragment -from .notification_channel import NotificationChannel -from .notification_channel_fragment import NotificationChannelFragment -from .notify_parameters import NotifyParameters -from .operation_error import OperationError -from .operation_metadata_display import OperationMetadataDisplay -from .operation_metadata import OperationMetadata -from .operation_result import OperationResult -from .policy import Policy -from .policy_fragment import PolicyFragment -from .port import Port -from .port_fragment import PortFragment -from .resource import Resource -from .retarget_schedule_properties import RetargetScheduleProperties -from .secret import Secret -from .service_runner import ServiceRunner -from .shutdown_notification_content import ShutdownNotificationContent -from .subnet import Subnet -from .subnet_fragment import SubnetFragment -from .subnet_shared_public_ip_address_configuration import SubnetSharedPublicIpAddressConfiguration -from .subnet_override import SubnetOverride -from .subnet_shared_public_ip_address_configuration_fragment import SubnetSharedPublicIpAddressConfigurationFragment -from .subnet_override_fragment import SubnetOverrideFragment -from .user_identity import UserIdentity -from .user_secret_store import UserSecretStore -from .user import User -from .user_identity_fragment import UserIdentityFragment -from .user_secret_store_fragment import UserSecretStoreFragment -from .user_fragment import UserFragment -from .virtual_network import VirtualNetwork -from .virtual_network_fragment import VirtualNetworkFragment +try: + from .week_details_py3 import WeekDetails + from .day_details_py3 import DayDetails + from .hour_details_py3 import HourDetails + from .notification_settings_py3 import NotificationSettings + from .schedule_py3 import Schedule + from .applicable_schedule_py3 import ApplicableSchedule + from .week_details_fragment_py3 import WeekDetailsFragment + from .day_details_fragment_py3 import DayDetailsFragment + from .hour_details_fragment_py3 import HourDetailsFragment + from .notification_settings_fragment_py3 import NotificationSettingsFragment + from .schedule_fragment_py3 import ScheduleFragment + from .applicable_schedule_fragment_py3 import ApplicableScheduleFragment + from .artifact_parameter_properties_py3 import ArtifactParameterProperties + from .artifact_install_properties_py3 import ArtifactInstallProperties + from .apply_artifacts_request_py3 import ApplyArtifactsRequest + from .parameters_value_file_info_py3 import ParametersValueFileInfo + from .arm_template_py3 import ArmTemplate + from .arm_template_info_py3 import ArmTemplateInfo + from .arm_template_parameter_properties_py3 import ArmTemplateParameterProperties + from .arm_template_parameter_properties_fragment_py3 import ArmTemplateParameterPropertiesFragment + from .artifact_py3 import Artifact + from .artifact_deployment_status_properties_py3 import ArtifactDeploymentStatusProperties + from .artifact_deployment_status_properties_fragment_py3 import ArtifactDeploymentStatusPropertiesFragment + from .artifact_parameter_properties_fragment_py3 import ArtifactParameterPropertiesFragment + from .artifact_install_properties_fragment_py3 import ArtifactInstallPropertiesFragment + from .artifact_source_py3 import ArtifactSource + from .artifact_source_fragment_py3 import ArtifactSourceFragment + from .attach_disk_properties_py3 import AttachDiskProperties + from .attach_new_data_disk_options_py3 import AttachNewDataDiskOptions + from .attach_new_data_disk_options_fragment_py3 import AttachNewDataDiskOptionsFragment + from .bulk_creation_parameters_py3 import BulkCreationParameters + from .bulk_creation_parameters_fragment_py3 import BulkCreationParametersFragment + from .compute_data_disk_py3 import ComputeDataDisk + from .compute_data_disk_fragment_py3 import ComputeDataDiskFragment + from .compute_vm_instance_view_status_py3 import ComputeVmInstanceViewStatus + from .compute_vm_instance_view_status_fragment_py3 import ComputeVmInstanceViewStatusFragment + from .compute_vm_properties_py3 import ComputeVmProperties + from .compute_vm_properties_fragment_py3 import ComputeVmPropertiesFragment + from .percentage_cost_threshold_properties_py3 import PercentageCostThresholdProperties + from .cost_threshold_properties_py3 import CostThresholdProperties + from .windows_os_info_py3 import WindowsOsInfo + from .linux_os_info_py3 import LinuxOsInfo + from .custom_image_properties_from_vm_py3 import CustomImagePropertiesFromVm + from .custom_image_properties_custom_py3 import CustomImagePropertiesCustom + from .data_disk_storage_type_info_py3 import DataDiskStorageTypeInfo + from .custom_image_properties_from_plan_py3 import CustomImagePropertiesFromPlan + from .custom_image_py3 import CustomImage + from .windows_os_info_fragment_py3 import WindowsOsInfoFragment + from .linux_os_info_fragment_py3 import LinuxOsInfoFragment + from .custom_image_properties_from_vm_fragment_py3 import CustomImagePropertiesFromVmFragment + from .custom_image_properties_custom_fragment_py3 import CustomImagePropertiesCustomFragment + from .data_disk_storage_type_info_fragment_py3 import DataDiskStorageTypeInfoFragment + from .custom_image_properties_from_plan_fragment_py3 import CustomImagePropertiesFromPlanFragment + from .custom_image_fragment_py3 import CustomImageFragment + from .data_disk_properties_py3 import DataDiskProperties + from .data_disk_properties_fragment_py3 import DataDiskPropertiesFragment + from .detach_data_disk_properties_py3 import DetachDataDiskProperties + from .detach_disk_properties_py3 import DetachDiskProperties + from .disk_py3 import Disk + from .disk_fragment_py3 import DiskFragment + from .environment_deployment_properties_py3 import EnvironmentDeploymentProperties + from .dtl_environment_py3 import DtlEnvironment + from .environment_deployment_properties_fragment_py3 import EnvironmentDeploymentPropertiesFragment + from .dtl_environment_fragment_py3 import DtlEnvironmentFragment + from .evaluate_policies_properties_py3 import EvaluatePoliciesProperties + from .evaluate_policies_request_py3 import EvaluatePoliciesRequest + from .policy_violation_py3 import PolicyViolation + from .policy_set_result_py3 import PolicySetResult + from .evaluate_policies_response_py3 import EvaluatePoliciesResponse + from .event_py3 import Event + from .event_fragment_py3 import EventFragment + from .export_resource_usage_parameters_py3 import ExportResourceUsageParameters + from .external_subnet_py3 import ExternalSubnet + from .external_subnet_fragment_py3 import ExternalSubnetFragment + from .gallery_image_reference_py3 import GalleryImageReference + from .inbound_nat_rule_py3 import InboundNatRule + from .shared_public_ip_address_configuration_py3 import SharedPublicIpAddressConfiguration + from .network_interface_properties_py3 import NetworkInterfaceProperties + from .schedule_creation_parameter_py3 import ScheduleCreationParameter + from .lab_virtual_machine_creation_parameter_py3 import LabVirtualMachineCreationParameter + from .formula_properties_from_vm_py3 import FormulaPropertiesFromVm + from .formula_py3 import Formula + from .gallery_image_reference_fragment_py3 import GalleryImageReferenceFragment + from .inbound_nat_rule_fragment_py3 import InboundNatRuleFragment + from .shared_public_ip_address_configuration_fragment_py3 import SharedPublicIpAddressConfigurationFragment + from .network_interface_properties_fragment_py3 import NetworkInterfacePropertiesFragment + from .schedule_creation_parameter_fragment_py3 import ScheduleCreationParameterFragment + from .lab_virtual_machine_creation_parameter_fragment_py3 import LabVirtualMachineCreationParameterFragment + from .formula_properties_from_vm_fragment_py3 import FormulaPropertiesFromVmFragment + from .formula_fragment_py3 import FormulaFragment + from .gallery_image_py3 import GalleryImage + from .parameter_info_py3 import ParameterInfo + from .generate_arm_template_request_py3 import GenerateArmTemplateRequest + from .generate_upload_uri_parameter_py3 import GenerateUploadUriParameter + from .generate_upload_uri_response_py3 import GenerateUploadUriResponse + from .identity_properties_py3 import IdentityProperties + from .import_lab_virtual_machine_request_py3 import ImportLabVirtualMachineRequest + from .lab_announcement_properties_py3 import LabAnnouncementProperties + from .lab_support_properties_py3 import LabSupportProperties + from .lab_py3 import Lab + from .lab_announcement_properties_fragment_py3 import LabAnnouncementPropertiesFragment + from .target_cost_properties_py3 import TargetCostProperties + from .lab_cost_summary_properties_py3 import LabCostSummaryProperties + from .lab_cost_details_properties_py3 import LabCostDetailsProperties + from .lab_resource_cost_properties_py3 import LabResourceCostProperties + from .lab_cost_py3 import LabCost + from .lab_support_properties_fragment_py3 import LabSupportPropertiesFragment + from .lab_fragment_py3 import LabFragment + from .lab_vhd_py3 import LabVhd + from .lab_virtual_machine_py3 import LabVirtualMachine + from .lab_virtual_machine_fragment_py3 import LabVirtualMachineFragment + from .notification_channel_py3 import NotificationChannel + from .notification_channel_fragment_py3 import NotificationChannelFragment + from .notify_parameters_py3 import NotifyParameters + from .operation_error_py3 import OperationError + from .operation_metadata_display_py3 import OperationMetadataDisplay + from .operation_metadata_py3 import OperationMetadata + from .operation_result_py3 import OperationResult + from .policy_py3 import Policy + from .policy_fragment_py3 import PolicyFragment + from .port_py3 import Port + from .port_fragment_py3 import PortFragment + from .rdp_connection_py3 import RdpConnection + from .resize_lab_virtual_machine_properties_py3 import ResizeLabVirtualMachineProperties + from .resource_py3 import Resource + from .retarget_schedule_properties_py3 import RetargetScheduleProperties + from .secret_py3 import Secret + from .secret_fragment_py3 import SecretFragment + from .service_fabric_py3 import ServiceFabric + from .service_fabric_fragment_py3 import ServiceFabricFragment + from .service_runner_py3 import ServiceRunner + from .shutdown_notification_content_py3 import ShutdownNotificationContent + from .subnet_py3 import Subnet + from .subnet_fragment_py3 import SubnetFragment + from .subnet_shared_public_ip_address_configuration_py3 import SubnetSharedPublicIpAddressConfiguration + from .subnet_override_py3 import SubnetOverride + from .subnet_shared_public_ip_address_configuration_fragment_py3 import SubnetSharedPublicIpAddressConfigurationFragment + from .subnet_override_fragment_py3 import SubnetOverrideFragment + from .update_resource_py3 import UpdateResource + from .user_identity_py3 import UserIdentity + from .user_secret_store_py3 import UserSecretStore + from .user_py3 import User + from .user_identity_fragment_py3 import UserIdentityFragment + from .user_secret_store_fragment_py3 import UserSecretStoreFragment + from .user_fragment_py3 import UserFragment + from .virtual_network_py3 import VirtualNetwork + from .virtual_network_fragment_py3 import VirtualNetworkFragment +except (SyntaxError, ImportError): + from .week_details import WeekDetails + from .day_details import DayDetails + from .hour_details import HourDetails + from .notification_settings import NotificationSettings + from .schedule import Schedule + from .applicable_schedule import ApplicableSchedule + from .week_details_fragment import WeekDetailsFragment + from .day_details_fragment import DayDetailsFragment + from .hour_details_fragment import HourDetailsFragment + from .notification_settings_fragment import NotificationSettingsFragment + from .schedule_fragment import ScheduleFragment + from .applicable_schedule_fragment import ApplicableScheduleFragment + from .artifact_parameter_properties import ArtifactParameterProperties + from .artifact_install_properties import ArtifactInstallProperties + from .apply_artifacts_request import ApplyArtifactsRequest + from .parameters_value_file_info import ParametersValueFileInfo + from .arm_template import ArmTemplate + from .arm_template_info import ArmTemplateInfo + from .arm_template_parameter_properties import ArmTemplateParameterProperties + from .arm_template_parameter_properties_fragment import ArmTemplateParameterPropertiesFragment + from .artifact import Artifact + from .artifact_deployment_status_properties import ArtifactDeploymentStatusProperties + from .artifact_deployment_status_properties_fragment import ArtifactDeploymentStatusPropertiesFragment + from .artifact_parameter_properties_fragment import ArtifactParameterPropertiesFragment + from .artifact_install_properties_fragment import ArtifactInstallPropertiesFragment + from .artifact_source import ArtifactSource + from .artifact_source_fragment import ArtifactSourceFragment + from .attach_disk_properties import AttachDiskProperties + from .attach_new_data_disk_options import AttachNewDataDiskOptions + from .attach_new_data_disk_options_fragment import AttachNewDataDiskOptionsFragment + from .bulk_creation_parameters import BulkCreationParameters + from .bulk_creation_parameters_fragment import BulkCreationParametersFragment + from .compute_data_disk import ComputeDataDisk + from .compute_data_disk_fragment import ComputeDataDiskFragment + from .compute_vm_instance_view_status import ComputeVmInstanceViewStatus + from .compute_vm_instance_view_status_fragment import ComputeVmInstanceViewStatusFragment + from .compute_vm_properties import ComputeVmProperties + from .compute_vm_properties_fragment import ComputeVmPropertiesFragment + from .percentage_cost_threshold_properties import PercentageCostThresholdProperties + from .cost_threshold_properties import CostThresholdProperties + from .windows_os_info import WindowsOsInfo + from .linux_os_info import LinuxOsInfo + from .custom_image_properties_from_vm import CustomImagePropertiesFromVm + from .custom_image_properties_custom import CustomImagePropertiesCustom + from .data_disk_storage_type_info import DataDiskStorageTypeInfo + from .custom_image_properties_from_plan import CustomImagePropertiesFromPlan + from .custom_image import CustomImage + from .windows_os_info_fragment import WindowsOsInfoFragment + from .linux_os_info_fragment import LinuxOsInfoFragment + from .custom_image_properties_from_vm_fragment import CustomImagePropertiesFromVmFragment + from .custom_image_properties_custom_fragment import CustomImagePropertiesCustomFragment + from .data_disk_storage_type_info_fragment import DataDiskStorageTypeInfoFragment + from .custom_image_properties_from_plan_fragment import CustomImagePropertiesFromPlanFragment + from .custom_image_fragment import CustomImageFragment + from .data_disk_properties import DataDiskProperties + from .data_disk_properties_fragment import DataDiskPropertiesFragment + from .detach_data_disk_properties import DetachDataDiskProperties + from .detach_disk_properties import DetachDiskProperties + from .disk import Disk + from .disk_fragment import DiskFragment + from .environment_deployment_properties import EnvironmentDeploymentProperties + from .dtl_environment import DtlEnvironment + from .environment_deployment_properties_fragment import EnvironmentDeploymentPropertiesFragment + from .dtl_environment_fragment import DtlEnvironmentFragment + from .evaluate_policies_properties import EvaluatePoliciesProperties + from .evaluate_policies_request import EvaluatePoliciesRequest + from .policy_violation import PolicyViolation + from .policy_set_result import PolicySetResult + from .evaluate_policies_response import EvaluatePoliciesResponse + from .event import Event + from .event_fragment import EventFragment + from .export_resource_usage_parameters import ExportResourceUsageParameters + from .external_subnet import ExternalSubnet + from .external_subnet_fragment import ExternalSubnetFragment + from .gallery_image_reference import GalleryImageReference + from .inbound_nat_rule import InboundNatRule + from .shared_public_ip_address_configuration import SharedPublicIpAddressConfiguration + from .network_interface_properties import NetworkInterfaceProperties + from .schedule_creation_parameter import ScheduleCreationParameter + from .lab_virtual_machine_creation_parameter import LabVirtualMachineCreationParameter + from .formula_properties_from_vm import FormulaPropertiesFromVm + from .formula import Formula + from .gallery_image_reference_fragment import GalleryImageReferenceFragment + from .inbound_nat_rule_fragment import InboundNatRuleFragment + from .shared_public_ip_address_configuration_fragment import SharedPublicIpAddressConfigurationFragment + from .network_interface_properties_fragment import NetworkInterfacePropertiesFragment + from .schedule_creation_parameter_fragment import ScheduleCreationParameterFragment + from .lab_virtual_machine_creation_parameter_fragment import LabVirtualMachineCreationParameterFragment + from .formula_properties_from_vm_fragment import FormulaPropertiesFromVmFragment + from .formula_fragment import FormulaFragment + from .gallery_image import GalleryImage + from .parameter_info import ParameterInfo + from .generate_arm_template_request import GenerateArmTemplateRequest + from .generate_upload_uri_parameter import GenerateUploadUriParameter + from .generate_upload_uri_response import GenerateUploadUriResponse + from .identity_properties import IdentityProperties + from .import_lab_virtual_machine_request import ImportLabVirtualMachineRequest + from .lab_announcement_properties import LabAnnouncementProperties + from .lab_support_properties import LabSupportProperties + from .lab import Lab + from .lab_announcement_properties_fragment import LabAnnouncementPropertiesFragment + from .target_cost_properties import TargetCostProperties + from .lab_cost_summary_properties import LabCostSummaryProperties + from .lab_cost_details_properties import LabCostDetailsProperties + from .lab_resource_cost_properties import LabResourceCostProperties + from .lab_cost import LabCost + from .lab_support_properties_fragment import LabSupportPropertiesFragment + from .lab_fragment import LabFragment + from .lab_vhd import LabVhd + from .lab_virtual_machine import LabVirtualMachine + from .lab_virtual_machine_fragment import LabVirtualMachineFragment + from .notification_channel import NotificationChannel + from .notification_channel_fragment import NotificationChannelFragment + from .notify_parameters import NotifyParameters + from .operation_error import OperationError + from .operation_metadata_display import OperationMetadataDisplay + from .operation_metadata import OperationMetadata + from .operation_result import OperationResult + from .policy import Policy + from .policy_fragment import PolicyFragment + from .port import Port + from .port_fragment import PortFragment + from .rdp_connection import RdpConnection + from .resize_lab_virtual_machine_properties import ResizeLabVirtualMachineProperties + from .resource import Resource + from .retarget_schedule_properties import RetargetScheduleProperties + from .secret import Secret + from .secret_fragment import SecretFragment + from .service_fabric import ServiceFabric + from .service_fabric_fragment import ServiceFabricFragment + from .service_runner import ServiceRunner + from .shutdown_notification_content import ShutdownNotificationContent + from .subnet import Subnet + from .subnet_fragment import SubnetFragment + from .subnet_shared_public_ip_address_configuration import SubnetSharedPublicIpAddressConfiguration + from .subnet_override import SubnetOverride + from .subnet_shared_public_ip_address_configuration_fragment import SubnetSharedPublicIpAddressConfigurationFragment + from .subnet_override_fragment import SubnetOverrideFragment + from .update_resource import UpdateResource + from .user_identity import UserIdentity + from .user_secret_store import UserSecretStore + from .user import User + from .user_identity_fragment import UserIdentityFragment + from .user_secret_store_fragment import UserSecretStoreFragment + from .user_fragment import UserFragment + from .virtual_network import VirtualNetwork + from .virtual_network_fragment import VirtualNetworkFragment from .operation_metadata_paged import OperationMetadataPaged from .lab_paged import LabPaged from .lab_vhd_paged import LabVhdPaged @@ -141,11 +322,11 @@ from .disk_paged import DiskPaged from .dtl_environment_paged import DtlEnvironmentPaged from .secret_paged import SecretPaged +from .service_fabric_paged import ServiceFabricPaged from .lab_virtual_machine_paged import LabVirtualMachinePaged from .virtual_network_paged import VirtualNetworkPaged from .dev_test_labs_client_enums import ( EnableStatus, - NotificationStatus, SourceControlType, StorageType, CostThresholdStatus, @@ -158,6 +339,7 @@ VirtualMachineCreationSource, FileUploadOptions, PremiumDataDisk, + EnvironmentPermission, TargetCostStatus, ReportingCycleType, CostType, @@ -188,6 +370,7 @@ 'ArmTemplate', 'ArmTemplateInfo', 'ArmTemplateParameterProperties', + 'ArmTemplateParameterPropertiesFragment', 'Artifact', 'ArtifactDeploymentStatusProperties', 'ArtifactDeploymentStatusPropertiesFragment', @@ -197,7 +380,9 @@ 'ArtifactSourceFragment', 'AttachDiskProperties', 'AttachNewDataDiskOptions', + 'AttachNewDataDiskOptionsFragment', 'BulkCreationParameters', + 'BulkCreationParametersFragment', 'ComputeDataDisk', 'ComputeDataDiskFragment', 'ComputeVmInstanceViewStatus', @@ -210,13 +395,26 @@ 'LinuxOsInfo', 'CustomImagePropertiesFromVm', 'CustomImagePropertiesCustom', + 'DataDiskStorageTypeInfo', + 'CustomImagePropertiesFromPlan', 'CustomImage', + 'WindowsOsInfoFragment', + 'LinuxOsInfoFragment', + 'CustomImagePropertiesFromVmFragment', + 'CustomImagePropertiesCustomFragment', + 'DataDiskStorageTypeInfoFragment', + 'CustomImagePropertiesFromPlanFragment', + 'CustomImageFragment', 'DataDiskProperties', + 'DataDiskPropertiesFragment', 'DetachDataDiskProperties', 'DetachDiskProperties', 'Disk', + 'DiskFragment', 'EnvironmentDeploymentProperties', 'DtlEnvironment', + 'EnvironmentDeploymentPropertiesFragment', + 'DtlEnvironmentFragment', 'EvaluatePoliciesProperties', 'EvaluatePoliciesRequest', 'PolicyViolation', @@ -231,28 +429,38 @@ 'InboundNatRule', 'SharedPublicIpAddressConfiguration', 'NetworkInterfaceProperties', + 'ScheduleCreationParameter', 'LabVirtualMachineCreationParameter', 'FormulaPropertiesFromVm', 'Formula', - 'GalleryImage', 'GalleryImageReferenceFragment', + 'InboundNatRuleFragment', + 'SharedPublicIpAddressConfigurationFragment', + 'NetworkInterfacePropertiesFragment', + 'ScheduleCreationParameterFragment', + 'LabVirtualMachineCreationParameterFragment', + 'FormulaPropertiesFromVmFragment', + 'FormulaFragment', + 'GalleryImage', 'ParameterInfo', 'GenerateArmTemplateRequest', 'GenerateUploadUriParameter', 'GenerateUploadUriResponse', 'IdentityProperties', - 'InboundNatRuleFragment', + 'ImportLabVirtualMachineRequest', + 'LabAnnouncementProperties', + 'LabSupportProperties', 'Lab', + 'LabAnnouncementPropertiesFragment', 'TargetCostProperties', 'LabCostSummaryProperties', 'LabCostDetailsProperties', 'LabResourceCostProperties', 'LabCost', + 'LabSupportPropertiesFragment', 'LabFragment', 'LabVhd', 'LabVirtualMachine', - 'SharedPublicIpAddressConfigurationFragment', - 'NetworkInterfacePropertiesFragment', 'LabVirtualMachineFragment', 'NotificationChannel', 'NotificationChannelFragment', @@ -265,9 +473,14 @@ 'PolicyFragment', 'Port', 'PortFragment', + 'RdpConnection', + 'ResizeLabVirtualMachineProperties', 'Resource', 'RetargetScheduleProperties', 'Secret', + 'SecretFragment', + 'ServiceFabric', + 'ServiceFabricFragment', 'ServiceRunner', 'ShutdownNotificationContent', 'Subnet', @@ -276,6 +489,7 @@ 'SubnetOverride', 'SubnetSharedPublicIpAddressConfigurationFragment', 'SubnetOverrideFragment', + 'UpdateResource', 'UserIdentity', 'UserSecretStore', 'User', @@ -301,10 +515,10 @@ 'DiskPaged', 'DtlEnvironmentPaged', 'SecretPaged', + 'ServiceFabricPaged', 'LabVirtualMachinePaged', 'VirtualNetworkPaged', 'EnableStatus', - 'NotificationStatus', 'SourceControlType', 'StorageType', 'CostThresholdStatus', @@ -317,6 +531,7 @@ 'VirtualMachineCreationSource', 'FileUploadOptions', 'PremiumDataDisk', + 'EnvironmentPermission', 'TargetCostStatus', 'ReportingCycleType', 'CostType', diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py index 445425b8db1a..bbdc049f2f3f 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule.py @@ -53,7 +53,7 @@ class ApplicableSchedule(Resource): 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, } - def __init__(self, location=None, tags=None, lab_vms_shutdown=None, lab_vms_startup=None): - super(ApplicableSchedule, self).__init__(location=location, tags=tags) - self.lab_vms_shutdown = lab_vms_shutdown - self.lab_vms_startup = lab_vms_startup + def __init__(self, **kwargs): + super(ApplicableSchedule, self).__init__(**kwargs) + self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) + self.lab_vms_startup = kwargs.get('lab_vms_startup', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py index c44ea058eae8..8139b26bbb37 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment.py @@ -9,24 +9,13 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .update_resource import UpdateResource -class ApplicableScheduleFragment(Resource): +class ApplicableScheduleFragment(UpdateResource): """Schedules applicable to a virtual machine. The schedules may have been defined on a VM or on lab level. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str :param tags: The tags of the resource. :type tags: dict[str, str] :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set @@ -37,23 +26,13 @@ class ApplicableScheduleFragment(Resource): :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, } - def __init__(self, location=None, tags=None, lab_vms_shutdown=None, lab_vms_startup=None): - super(ApplicableScheduleFragment, self).__init__(location=location, tags=tags) - self.lab_vms_shutdown = lab_vms_shutdown - self.lab_vms_startup = lab_vms_startup + def __init__(self, **kwargs): + super(ApplicableScheduleFragment, self).__init__(**kwargs) + self.lab_vms_shutdown = kwargs.get('lab_vms_shutdown', None) + self.lab_vms_startup = kwargs.get('lab_vms_startup', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py new file mode 100644 index 000000000000..d1ddb7b37caa --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_fragment_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource_py3 import UpdateResource + + +class ApplicableScheduleFragment(UpdateResource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.ScheduleFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'ScheduleFragment'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'ScheduleFragment'}, + } + + def __init__(self, *, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: + super(ApplicableScheduleFragment, self).__init__(tags=tags, **kwargs) + self.lab_vms_shutdown = lab_vms_shutdown + self.lab_vms_startup = lab_vms_startup diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py new file mode 100644 index 000000000000..dabce38bbcae --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/applicable_schedule_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ApplicableSchedule(Resource): + """Schedules applicable to a virtual machine. The schedules may have been + defined on a VM or on lab level. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_vms_shutdown: The auto-shutdown schedule, if one has been set + at the lab or lab resource level. + :type lab_vms_shutdown: ~azure.mgmt.devtestlabs.models.Schedule + :param lab_vms_startup: The auto-startup schedule, if one has been set at + the lab or lab resource level. + :type lab_vms_startup: ~azure.mgmt.devtestlabs.models.Schedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_vms_shutdown': {'key': 'properties.labVmsShutdown', 'type': 'Schedule'}, + 'lab_vms_startup': {'key': 'properties.labVmsStartup', 'type': 'Schedule'}, + } + + def __init__(self, *, location: str=None, tags=None, lab_vms_shutdown=None, lab_vms_startup=None, **kwargs) -> None: + super(ApplicableSchedule, self).__init__(location=location, tags=tags, **kwargs) + self.lab_vms_shutdown = lab_vms_shutdown + self.lab_vms_startup = lab_vms_startup diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py index 746e86368460..5576e79bf0ad 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py @@ -24,6 +24,6 @@ class ApplyArtifactsRequest(Model): 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, } - def __init__(self, artifacts=None): - super(ApplyArtifactsRequest, self).__init__() - self.artifacts = artifacts + def __init__(self, **kwargs): + super(ApplyArtifactsRequest, self).__init__(**kwargs) + self.artifacts = kwargs.get('artifacts', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py new file mode 100644 index 000000000000..2e5de7eca69f --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplyArtifactsRequest(Model): + """Request body for applying artifacts to a virtual machine. + + :param artifacts: The list of artifacts to apply. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + """ + + _attribute_map = { + 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, + } + + def __init__(self, *, artifacts=None, **kwargs) -> None: + super(ApplyArtifactsRequest, self).__init__(**kwargs) + self.artifacts = artifacts diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py index 0a18ba39f526..9ff3ebed92de 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template.py @@ -44,6 +44,8 @@ class ArmTemplate(Resource): information from all azuredeploy.*.parameters.json for the ARM template. :vartype parameters_value_files_info: list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] + :ivar enabled: Whether or not ARM template is enabled for use by lab user. + :vartype enabled: bool """ _validation = { @@ -57,6 +59,7 @@ class ArmTemplate(Resource): 'contents': {'readonly': True}, 'created_date': {'readonly': True}, 'parameters_value_files_info': {'readonly': True}, + 'enabled': {'readonly': True}, } _attribute_map = { @@ -72,10 +75,11 @@ class ArmTemplate(Resource): 'contents': {'key': 'properties.contents', 'type': 'object'}, 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, } - def __init__(self, location=None, tags=None): - super(ArmTemplate, self).__init__(location=location, tags=tags) + def __init__(self, **kwargs): + super(ArmTemplate, self).__init__(**kwargs) self.display_name = None self.description = None self.publisher = None @@ -83,3 +87,4 @@ def __init__(self, location=None, tags=None): self.contents = None self.created_date = None self.parameters_value_files_info = None + self.enabled = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py index 7cabc25b5215..9706cf3d1122 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info.py @@ -26,7 +26,7 @@ class ArmTemplateInfo(Model): 'parameters': {'key': 'parameters', 'type': 'object'}, } - def __init__(self, template=None, parameters=None): - super(ArmTemplateInfo, self).__init__() - self.template = template - self.parameters = parameters + def __init__(self, **kwargs): + super(ArmTemplateInfo, self).__init__(**kwargs) + self.template = kwargs.get('template', None) + self.parameters = kwargs.get('parameters', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py new file mode 100644 index 000000000000..6194e4d20559 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_info_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ArmTemplateInfo(Model): + """Information about a generated ARM template. + + :param template: The template's contents. + :type template: object + :param parameters: The parameters of the ARM template. + :type parameters: object + """ + + _attribute_map = { + 'template': {'key': 'template', 'type': 'object'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + } + + def __init__(self, *, template=None, parameters=None, **kwargs) -> None: + super(ArmTemplateInfo, self).__init__(**kwargs) + self.template = template + self.parameters = parameters diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py index 2c55da13efc4..9c939b46ff98 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties.py @@ -26,7 +26,7 @@ class ArmTemplateParameterProperties(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name=None, value=None): - super(ArmTemplateParameterProperties, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(ArmTemplateParameterProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py new file mode 100644 index 000000000000..c73b8c260aee --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ArmTemplateParameterPropertiesFragment(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py new file mode 100644 index 000000000000..ca110d0ee441 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_fragment_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ArmTemplateParameterPropertiesFragment(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArmTemplateParameterPropertiesFragment, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py new file mode 100644 index 000000000000..16ab6753be2e --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_parameter_properties_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ArmTemplateParameterProperties(Model): + """Properties of an Azure Resource Manager template parameter. + + :param name: The name of the template parameter. + :type name: str + :param value: The value of the template parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArmTemplateParameterProperties, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py new file mode 100644 index 000000000000..64b55696e79c --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/arm_template_py3.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ArmTemplate(Resource): + """An Azure Resource Manager template. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar display_name: The display name of the ARM template. + :vartype display_name: str + :ivar description: The description of the ARM template. + :vartype description: str + :ivar publisher: The publisher of the ARM template. + :vartype publisher: str + :ivar icon: The URI to the icon of the ARM template. + :vartype icon: str + :ivar contents: The contents of the ARM template. + :vartype contents: object + :ivar created_date: The creation date of the armTemplate. + :vartype created_date: datetime + :ivar parameters_value_files_info: File name and parameter values + information from all azuredeploy.*.parameters.json for the ARM template. + :vartype parameters_value_files_info: + list[~azure.mgmt.devtestlabs.models.ParametersValueFileInfo] + :ivar enabled: Whether or not ARM template is enabled for use by lab user. + :vartype enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'icon': {'readonly': True}, + 'contents': {'readonly': True}, + 'created_date': {'readonly': True}, + 'parameters_value_files_info': {'readonly': True}, + 'enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'contents': {'key': 'properties.contents', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'parameters_value_files_info': {'key': 'properties.parametersValueFilesInfo', 'type': '[ParametersValueFileInfo]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(ArmTemplate, self).__init__(location=location, tags=tags, **kwargs) + self.display_name = None + self.description = None + self.publisher = None + self.icon = None + self.contents = None + self.created_date = None + self.parameters_value_files_info = None + self.enabled = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py index aa1351453883..cf1884020662 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact.py @@ -76,8 +76,8 @@ class Artifact(Resource): 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, } - def __init__(self, location=None, tags=None): - super(Artifact, self).__init__(location=location, tags=tags) + def __init__(self, **kwargs): + super(Artifact, self).__init__(**kwargs) self.title = None self.description = None self.publisher = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py index 898d2b413c79..00e10ab200d7 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties.py @@ -31,8 +31,8 @@ class ArtifactDeploymentStatusProperties(Model): 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, } - def __init__(self, deployment_status=None, artifacts_applied=None, total_artifacts=None): - super(ArtifactDeploymentStatusProperties, self).__init__() - self.deployment_status = deployment_status - self.artifacts_applied = artifacts_applied - self.total_artifacts = total_artifacts + def __init__(self, **kwargs): + super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) + self.deployment_status = kwargs.get('deployment_status', None) + self.artifacts_applied = kwargs.get('artifacts_applied', None) + self.total_artifacts = kwargs.get('total_artifacts', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py index 7c730504776e..b5231c92c635 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment.py @@ -31,8 +31,8 @@ class ArtifactDeploymentStatusPropertiesFragment(Model): 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, } - def __init__(self, deployment_status=None, artifacts_applied=None, total_artifacts=None): - super(ArtifactDeploymentStatusPropertiesFragment, self).__init__() - self.deployment_status = deployment_status - self.artifacts_applied = artifacts_applied - self.total_artifacts = total_artifacts + def __init__(self, **kwargs): + super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) + self.deployment_status = kwargs.get('deployment_status', None) + self.artifacts_applied = kwargs.get('artifacts_applied', None) + self.total_artifacts = kwargs.get('total_artifacts', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py new file mode 100644 index 000000000000..d3dd5372ef6d --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_fragment_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ArtifactDeploymentStatusPropertiesFragment(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: + super(ArtifactDeploymentStatusPropertiesFragment, self).__init__(**kwargs) + self.deployment_status = deployment_status + self.artifacts_applied = artifacts_applied + self.total_artifacts = total_artifacts diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py new file mode 100644 index 000000000000..5b38610af59e --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_deployment_status_properties_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ArtifactDeploymentStatusProperties(Model): + """Properties of an artifact deployment. + + :param deployment_status: The deployment status of the artifact. + :type deployment_status: str + :param artifacts_applied: The total count of the artifacts that were + successfully applied. + :type artifacts_applied: int + :param total_artifacts: The total count of the artifacts that were + tentatively applied. + :type total_artifacts: int + """ + + _attribute_map = { + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'artifacts_applied': {'key': 'artifactsApplied', 'type': 'int'}, + 'total_artifacts': {'key': 'totalArtifacts', 'type': 'int'}, + } + + def __init__(self, *, deployment_status: str=None, artifacts_applied: int=None, total_artifacts: int=None, **kwargs) -> None: + super(ArtifactDeploymentStatusProperties, self).__init__(**kwargs) + self.deployment_status = deployment_status + self.artifacts_applied = artifacts_applied + self.total_artifacts = total_artifacts diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py index 9ed4ea8debb4..7a976ea8f7b1 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties.py @@ -17,6 +17,8 @@ class ArtifactInstallProperties(Model): :param artifact_id: The artifact's identifier. :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str :param parameters: The parameters of the artifact. :type parameters: list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] @@ -34,6 +36,7 @@ class ArtifactInstallProperties(Model): _attribute_map = { 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, 'status': {'key': 'status', 'type': 'str'}, 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, @@ -41,11 +44,12 @@ class ArtifactInstallProperties(Model): 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, } - def __init__(self, artifact_id=None, parameters=None, status=None, deployment_status_message=None, vm_extension_status_message=None, install_time=None): - super(ArtifactInstallProperties, self).__init__() - self.artifact_id = artifact_id - self.parameters = parameters - self.status = status - self.deployment_status_message = deployment_status_message - self.vm_extension_status_message = vm_extension_status_message - self.install_time = install_time + def __init__(self, **kwargs): + super(ArtifactInstallProperties, self).__init__(**kwargs) + self.artifact_id = kwargs.get('artifact_id', None) + self.artifact_title = kwargs.get('artifact_title', None) + self.parameters = kwargs.get('parameters', None) + self.status = kwargs.get('status', None) + self.deployment_status_message = kwargs.get('deployment_status_message', None) + self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) + self.install_time = kwargs.get('install_time', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py index 19573f288e7f..0149af16d549 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment.py @@ -17,6 +17,8 @@ class ArtifactInstallPropertiesFragment(Model): :param artifact_id: The artifact's identifier. :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str :param parameters: The parameters of the artifact. :type parameters: list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] @@ -34,6 +36,7 @@ class ArtifactInstallPropertiesFragment(Model): _attribute_map = { 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, 'status': {'key': 'status', 'type': 'str'}, 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, @@ -41,11 +44,12 @@ class ArtifactInstallPropertiesFragment(Model): 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, } - def __init__(self, artifact_id=None, parameters=None, status=None, deployment_status_message=None, vm_extension_status_message=None, install_time=None): - super(ArtifactInstallPropertiesFragment, self).__init__() - self.artifact_id = artifact_id - self.parameters = parameters - self.status = status - self.deployment_status_message = deployment_status_message - self.vm_extension_status_message = vm_extension_status_message - self.install_time = install_time + def __init__(self, **kwargs): + super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) + self.artifact_id = kwargs.get('artifact_id', None) + self.artifact_title = kwargs.get('artifact_title', None) + self.parameters = kwargs.get('parameters', None) + self.status = kwargs.get('status', None) + self.deployment_status_message = kwargs.get('deployment_status_message', None) + self.vm_extension_status_message = kwargs.get('vm_extension_status_message', None) + self.install_time = kwargs.get('install_time', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py new file mode 100644 index 000000000000..4aa552477186 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_fragment_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ArtifactInstallPropertiesFragment(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterPropertiesFragment] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterPropertiesFragment]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: + super(ArtifactInstallPropertiesFragment, self).__init__(**kwargs) + self.artifact_id = artifact_id + self.artifact_title = artifact_title + self.parameters = parameters + self.status = status + self.deployment_status_message = deployment_status_message + self.vm_extension_status_message = vm_extension_status_message + self.install_time = install_time diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py new file mode 100644 index 000000000000..3df682e56bc6 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_install_properties_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ArtifactInstallProperties(Model): + """Properties of an artifact. + + :param artifact_id: The artifact's identifier. + :type artifact_id: str + :param artifact_title: The artifact's title. + :type artifact_title: str + :param parameters: The parameters of the artifact. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArtifactParameterProperties] + :param status: The status of the artifact. + :type status: str + :param deployment_status_message: The status message from the deployment. + :type deployment_status_message: str + :param vm_extension_status_message: The status message from the virtual + machine extension. + :type vm_extension_status_message: str + :param install_time: The time that the artifact starts to install on the + virtual machine. + :type install_time: datetime + """ + + _attribute_map = { + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_title': {'key': 'artifactTitle', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArtifactParameterProperties]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'deployment_status_message': {'key': 'deploymentStatusMessage', 'type': 'str'}, + 'vm_extension_status_message': {'key': 'vmExtensionStatusMessage', 'type': 'str'}, + 'install_time': {'key': 'installTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, artifact_id: str=None, artifact_title: str=None, parameters=None, status: str=None, deployment_status_message: str=None, vm_extension_status_message: str=None, install_time=None, **kwargs) -> None: + super(ArtifactInstallProperties, self).__init__(**kwargs) + self.artifact_id = artifact_id + self.artifact_title = artifact_title + self.parameters = parameters + self.status = status + self.deployment_status_message = deployment_status_message + self.vm_extension_status_message = vm_extension_status_message + self.install_time = install_time diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py index 465d4ceca8f1..546480baabd2 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties.py @@ -26,7 +26,7 @@ class ArtifactParameterProperties(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name=None, value=None): - super(ArtifactParameterProperties, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(ArtifactParameterProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py index 316b2afaa39a..77be250d5e11 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment.py @@ -26,7 +26,7 @@ class ArtifactParameterPropertiesFragment(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name=None, value=None): - super(ArtifactParameterPropertiesFragment, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py new file mode 100644 index 000000000000..326ea3643623 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_fragment_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ArtifactParameterPropertiesFragment(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArtifactParameterPropertiesFragment, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py new file mode 100644 index 000000000000..c3ef4207b385 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_parameter_properties_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ArtifactParameterProperties(Model): + """Properties of an artifact parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ArtifactParameterProperties, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py new file mode 100644 index 000000000000..9e36ad2abf3f --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_py3.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class Artifact(Resource): + """An artifact. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar title: The artifact's title. + :vartype title: str + :ivar description: The artifact's description. + :vartype description: str + :ivar publisher: The artifact's publisher. + :vartype publisher: str + :ivar file_path: The file path to the artifact. + :vartype file_path: str + :ivar icon: The URI to the artifact icon. + :vartype icon: str + :ivar target_os_type: The artifact's target OS. + :vartype target_os_type: str + :ivar parameters: The artifact's parameters. + :vartype parameters: object + :ivar created_date: The artifact's creation date. + :vartype created_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'readonly': True}, + 'description': {'readonly': True}, + 'publisher': {'readonly': True}, + 'file_path': {'readonly': True}, + 'icon': {'readonly': True}, + 'target_os_type': {'readonly': True}, + 'parameters': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'target_os_type': {'key': 'properties.targetOsType', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': 'object'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Artifact, self).__init__(location=location, tags=tags, **kwargs) + self.title = None + self.description = None + self.publisher = None + self.file_path = None + self.icon = None + self.target_os_type = None + self.parameters = None + self.created_date = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py index 0892fb41799c..ba6cbfc20988 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source.py @@ -50,11 +50,11 @@ class ArtifactSource(Resource): :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus :ivar created_date: The artifact source's creation date. :vartype created_date: datetime - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource (Guid). - :type unique_identifier: str + :vartype unique_identifier: str """ _validation = { @@ -62,6 +62,8 @@ class ArtifactSource(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, } _attribute_map = { @@ -83,16 +85,16 @@ class ArtifactSource(Resource): 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, display_name=None, uri=None, source_type=None, folder_path=None, arm_template_folder_path=None, branch_ref=None, security_token=None, status=None, provisioning_state=None, unique_identifier=None): - super(ArtifactSource, self).__init__(location=location, tags=tags) - self.display_name = display_name - self.uri = uri - self.source_type = source_type - self.folder_path = folder_path - self.arm_template_folder_path = arm_template_folder_path - self.branch_ref = branch_ref - self.security_token = security_token - self.status = status + def __init__(self, **kwargs): + super(ArtifactSource, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.uri = kwargs.get('uri', None) + self.source_type = kwargs.get('source_type', None) + self.folder_path = kwargs.get('folder_path', None) + self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) + self.branch_ref = kwargs.get('branch_ref', None) + self.security_token = kwargs.get('security_token', None) + self.status = kwargs.get('status', None) self.created_date = None - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py index 80beffbc267b..3c07b25eeb13 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment.py @@ -9,23 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .update_resource import UpdateResource -class ArtifactSourceFragment(Resource): +class ArtifactSourceFragment(UpdateResource): """Properties of an artifact source. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str :param tags: The tags of the resource. :type tags: dict[str, str] :param display_name: The artifact source's display name. @@ -48,24 +37,9 @@ class ArtifactSourceFragment(Resource): :param status: Indicates if the artifact source is enabled (values: Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource - (Guid). - :type unique_identifier: str """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'uri': {'key': 'properties.uri', 'type': 'str'}, @@ -75,19 +49,15 @@ class ArtifactSourceFragment(Resource): 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, display_name=None, uri=None, source_type=None, folder_path=None, arm_template_folder_path=None, branch_ref=None, security_token=None, status=None, provisioning_state=None, unique_identifier=None): - super(ArtifactSourceFragment, self).__init__(location=location, tags=tags) - self.display_name = display_name - self.uri = uri - self.source_type = source_type - self.folder_path = folder_path - self.arm_template_folder_path = arm_template_folder_path - self.branch_ref = branch_ref - self.security_token = security_token - self.status = status - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + def __init__(self, **kwargs): + super(ArtifactSourceFragment, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.uri = kwargs.get('uri', None) + self.source_type = kwargs.get('source_type', None) + self.folder_path = kwargs.get('folder_path', None) + self.arm_template_folder_path = kwargs.get('arm_template_folder_path', None) + self.branch_ref = kwargs.get('branch_ref', None) + self.security_token = kwargs.get('security_token', None) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py new file mode 100644 index 000000000000..a243837b76d0 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_fragment_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource_py3 import UpdateResource + + +class ArtifactSourceFragment(UpdateResource): + """Properties of an artifact source. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, *, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: + super(ArtifactSourceFragment, self).__init__(tags=tags, **kwargs) + self.display_name = display_name + self.uri = uri + self.source_type = source_type + self.folder_path = folder_path + self.arm_template_folder_path = arm_template_folder_path + self.branch_ref = branch_ref + self.security_token = security_token + self.status = status diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py new file mode 100644 index 000000000000..53eeac5462f6 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/artifact_source_py3.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ArtifactSource(Resource): + """Properties of an artifact source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param display_name: The artifact source's display name. + :type display_name: str + :param uri: The artifact source's URI. + :type uri: str + :param source_type: The artifact source's type. Possible values include: + 'VsoGit', 'GitHub' + :type source_type: str or ~azure.mgmt.devtestlabs.models.SourceControlType + :param folder_path: The folder containing artifacts. + :type folder_path: str + :param arm_template_folder_path: The folder containing Azure Resource + Manager templates. + :type arm_template_folder_path: str + :param branch_ref: The artifact source's branch reference. + :type branch_ref: str + :param security_token: The security token to authenticate to the artifact + source. + :type security_token: str + :param status: Indicates if the artifact source is enabled (values: + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :ivar created_date: The artifact source's creation date. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'source_type': {'key': 'properties.sourceType', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'arm_template_folder_path': {'key': 'properties.armTemplateFolderPath', 'type': 'str'}, + 'branch_ref': {'key': 'properties.branchRef', 'type': 'str'}, + 'security_token': {'key': 'properties.securityToken', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, display_name: str=None, uri: str=None, source_type=None, folder_path: str=None, arm_template_folder_path: str=None, branch_ref: str=None, security_token: str=None, status=None, **kwargs) -> None: + super(ArtifactSource, self).__init__(location=location, tags=tags, **kwargs) + self.display_name = display_name + self.uri = uri + self.source_type = source_type + self.folder_path = folder_path + self.arm_template_folder_path = arm_template_folder_path + self.branch_ref = branch_ref + self.security_token = security_token + self.status = status + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py index b43dff0086a3..1935925ef669 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties.py @@ -24,6 +24,6 @@ class AttachDiskProperties(Model): 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, } - def __init__(self, leased_by_lab_vm_id=None): - super(AttachDiskProperties, self).__init__() - self.leased_by_lab_vm_id = leased_by_lab_vm_id + def __init__(self, **kwargs): + super(AttachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py new file mode 100644 index 000000000000..6cf94213e53e --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_disk_properties_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AttachDiskProperties(Model): + """Properties of the disk to attach. + + :param leased_by_lab_vm_id: The resource ID of the Lab virtual machine to + which the disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: + super(AttachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = leased_by_lab_vm_id diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py index 95255b8c85e3..4809eb43abb3 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py @@ -30,8 +30,8 @@ class AttachNewDataDiskOptions(Model): 'disk_type': {'key': 'diskType', 'type': 'str'}, } - def __init__(self, disk_size_gi_b=None, disk_name=None, disk_type=None): - super(AttachNewDataDiskOptions, self).__init__() - self.disk_size_gi_b = disk_size_gi_b - self.disk_name = disk_name - self.disk_type = disk_type + def __init__(self, **kwargs): + super(AttachNewDataDiskOptions, self).__init__(**kwargs) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.disk_name = kwargs.get('disk_name', None) + self.disk_type = kwargs.get('disk_type', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py new file mode 100644 index 000000000000..763664dec3f3 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AttachNewDataDiskOptionsFragment(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.disk_name = kwargs.get('disk_name', None) + self.disk_type = kwargs.get('disk_type', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py new file mode 100644 index 000000000000..98ae37174525 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AttachNewDataDiskOptionsFragment(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: + super(AttachNewDataDiskOptionsFragment, self).__init__(**kwargs) + self.disk_size_gi_b = disk_size_gi_b + self.disk_name = disk_name + self.disk_type = disk_type diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py new file mode 100644 index 000000000000..54e830630550 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AttachNewDataDiskOptions(Model): + """Properties to attach new disk to the Virtual Machine. + + :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :type disk_size_gi_b: int + :param disk_name: The name of the disk to be attached. + :type disk_name: str + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + 'disk_name': {'key': 'diskName', 'type': 'str'}, + 'disk_type': {'key': 'diskType', 'type': 'str'}, + } + + def __init__(self, *, disk_size_gi_b: int=None, disk_name: str=None, disk_type=None, **kwargs) -> None: + super(AttachNewDataDiskOptions, self).__init__(**kwargs) + self.disk_size_gi_b = disk_size_gi_b + self.disk_name = disk_name + self.disk_type = disk_type diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py index 6bdf9e9603b0..f54138ff7a98 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters.py @@ -23,6 +23,6 @@ class BulkCreationParameters(Model): 'instance_count': {'key': 'instanceCount', 'type': 'int'}, } - def __init__(self, instance_count=None): - super(BulkCreationParameters, self).__init__() - self.instance_count = instance_count + def __init__(self, **kwargs): + super(BulkCreationParameters, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py new file mode 100644 index 000000000000..1f03bf7aeffd --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BulkCreationParametersFragment(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BulkCreationParametersFragment, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py new file mode 100644 index 000000000000..3d78014f88c5 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_fragment_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BulkCreationParametersFragment(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, *, instance_count: int=None, **kwargs) -> None: + super(BulkCreationParametersFragment, self).__init__(**kwargs) + self.instance_count = instance_count diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py new file mode 100644 index 000000000000..c17ac0c6da94 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/bulk_creation_parameters_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BulkCreationParameters(Model): + """Parameters for creating multiple virtual machines as a single action. + + :param instance_count: The number of virtual machine instances to create. + :type instance_count: int + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, *, instance_count: int=None, **kwargs) -> None: + super(BulkCreationParameters, self).__init__(**kwargs) + self.instance_count = instance_count diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py index d8ffd245feb8..36637b964ecc 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk.py @@ -33,9 +33,9 @@ class ComputeDataDisk(Model): 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, } - def __init__(self, name=None, disk_uri=None, managed_disk_id=None, disk_size_gi_b=None): - super(ComputeDataDisk, self).__init__() - self.name = name - self.disk_uri = disk_uri - self.managed_disk_id = managed_disk_id - self.disk_size_gi_b = disk_size_gi_b + def __init__(self, **kwargs): + super(ComputeDataDisk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py index f22722d204ab..5dc673a52f22 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment.py @@ -33,9 +33,9 @@ class ComputeDataDiskFragment(Model): 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, } - def __init__(self, name=None, disk_uri=None, managed_disk_id=None, disk_size_gi_b=None): - super(ComputeDataDiskFragment, self).__init__() - self.name = name - self.disk_uri = disk_uri - self.managed_disk_id = managed_disk_id - self.disk_size_gi_b = disk_size_gi_b + def __init__(self, **kwargs): + super(ComputeDataDiskFragment, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py new file mode 100644 index 000000000000..22fcaa4b3ad8 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_fragment_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ComputeDataDiskFragment(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: + super(ComputeDataDiskFragment, self).__init__(**kwargs) + self.name = name + self.disk_uri = disk_uri + self.managed_disk_id = managed_disk_id + self.disk_size_gi_b = disk_size_gi_b diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py new file mode 100644 index 000000000000..c88f007a5c0d --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_data_disk_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ComputeDataDisk(Model): + """A data disks attached to a virtual machine. + + :param name: Gets data disk name. + :type name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :param disk_size_gi_b: Gets data disk size in GiB. + :type disk_size_gi_b: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_uri': {'key': 'diskUri', 'type': 'str'}, + 'managed_disk_id': {'key': 'managedDiskId', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'diskSizeGiB', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, disk_uri: str=None, managed_disk_id: str=None, disk_size_gi_b: int=None, **kwargs) -> None: + super(ComputeDataDisk, self).__init__(**kwargs) + self.name = name + self.disk_uri = disk_uri + self.managed_disk_id = managed_disk_id + self.disk_size_gi_b = disk_size_gi_b diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py index 1f9f4a57c07d..896d9562e61d 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status.py @@ -29,8 +29,8 @@ class ComputeVmInstanceViewStatus(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, code=None, display_status=None, message=None): - super(ComputeVmInstanceViewStatus, self).__init__() - self.code = code - self.display_status = display_status - self.message = message + def __init__(self, **kwargs): + super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py index 919aae57995e..2b403562e4df 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment.py @@ -29,8 +29,8 @@ class ComputeVmInstanceViewStatusFragment(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, code=None, display_status=None, message=None): - super(ComputeVmInstanceViewStatusFragment, self).__init__() - self.code = code - self.display_status = display_status - self.message = message + def __init__(self, **kwargs): + super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py new file mode 100644 index 000000000000..81b1bd388f89 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_fragment_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ComputeVmInstanceViewStatusFragment(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: + super(ComputeVmInstanceViewStatusFragment, self).__init__(**kwargs) + self.code = code + self.display_status = display_status + self.message = message diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py new file mode 100644 index 000000000000..75fca83157a1 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_instance_view_status_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ComputeVmInstanceViewStatus(Model): + """Status information about a virtual machine. + + :param code: Gets the status Code. + :type code: str + :param display_status: Gets the short localizable label for the status. + :type display_status: str + :param message: Gets the message associated with the status. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, display_status: str=None, message: str=None, **kwargs) -> None: + super(ComputeVmInstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.display_status = display_status + self.message = message diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py index 3cce08529989..e4b785b9c47a 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties.py @@ -43,12 +43,12 @@ class ComputeVmProperties(Model): 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, } - def __init__(self, statuses=None, os_type=None, vm_size=None, network_interface_id=None, os_disk_id=None, data_disk_ids=None, data_disks=None): - super(ComputeVmProperties, self).__init__() - self.statuses = statuses - self.os_type = os_type - self.vm_size = vm_size - self.network_interface_id = network_interface_id - self.os_disk_id = os_disk_id - self.data_disk_ids = data_disk_ids - self.data_disks = data_disks + def __init__(self, **kwargs): + super(ComputeVmProperties, self).__init__(**kwargs) + self.statuses = kwargs.get('statuses', None) + self.os_type = kwargs.get('os_type', None) + self.vm_size = kwargs.get('vm_size', None) + self.network_interface_id = kwargs.get('network_interface_id', None) + self.os_disk_id = kwargs.get('os_disk_id', None) + self.data_disk_ids = kwargs.get('data_disk_ids', None) + self.data_disks = kwargs.get('data_disks', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py index 44f7db1d9fba..c6295526ebd6 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment.py @@ -44,12 +44,12 @@ class ComputeVmPropertiesFragment(Model): 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, } - def __init__(self, statuses=None, os_type=None, vm_size=None, network_interface_id=None, os_disk_id=None, data_disk_ids=None, data_disks=None): - super(ComputeVmPropertiesFragment, self).__init__() - self.statuses = statuses - self.os_type = os_type - self.vm_size = vm_size - self.network_interface_id = network_interface_id - self.os_disk_id = os_disk_id - self.data_disk_ids = data_disk_ids - self.data_disks = data_disks + def __init__(self, **kwargs): + super(ComputeVmPropertiesFragment, self).__init__(**kwargs) + self.statuses = kwargs.get('statuses', None) + self.os_type = kwargs.get('os_type', None) + self.vm_size = kwargs.get('vm_size', None) + self.network_interface_id = kwargs.get('network_interface_id', None) + self.os_disk_id = kwargs.get('os_disk_id', None) + self.data_disk_ids = kwargs.get('data_disk_ids', None) + self.data_disks = kwargs.get('data_disks', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py new file mode 100644 index 000000000000..7668ed7983c1 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_fragment_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ComputeVmPropertiesFragment(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatusFragment] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: + list[~azure.mgmt.devtestlabs.models.ComputeDataDiskFragment] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatusFragment]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDiskFragment]'}, + } + + def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: + super(ComputeVmPropertiesFragment, self).__init__(**kwargs) + self.statuses = statuses + self.os_type = os_type + self.vm_size = vm_size + self.network_interface_id = network_interface_id + self.os_disk_id = os_disk_id + self.data_disk_ids = data_disk_ids + self.data_disks = data_disks diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py new file mode 100644 index 000000000000..90c4ae4e246a --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/compute_vm_properties_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ComputeVmProperties(Model): + """Properties of a virtual machine returned by the Microsoft.Compute API. + + :param statuses: Gets the statuses of the virtual machine. + :type statuses: + list[~azure.mgmt.devtestlabs.models.ComputeVmInstanceViewStatus] + :param os_type: Gets the OS type of the virtual machine. + :type os_type: str + :param vm_size: Gets the size of the virtual machine. + :type vm_size: str + :param network_interface_id: Gets the network interface ID of the virtual + machine. + :type network_interface_id: str + :param os_disk_id: Gets OS disk blob uri for the virtual machine. + :type os_disk_id: str + :param data_disk_ids: Gets data disks blob uri for the virtual machine. + :type data_disk_ids: list[str] + :param data_disks: Gets all data disks attached to the virtual machine. + :type data_disks: list[~azure.mgmt.devtestlabs.models.ComputeDataDisk] + """ + + _attribute_map = { + 'statuses': {'key': 'statuses', 'type': '[ComputeVmInstanceViewStatus]'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'network_interface_id': {'key': 'networkInterfaceId', 'type': 'str'}, + 'os_disk_id': {'key': 'osDiskId', 'type': 'str'}, + 'data_disk_ids': {'key': 'dataDiskIds', 'type': '[str]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeDataDisk]'}, + } + + def __init__(self, *, statuses=None, os_type: str=None, vm_size: str=None, network_interface_id: str=None, os_disk_id: str=None, data_disk_ids=None, data_disks=None, **kwargs) -> None: + super(ComputeVmProperties, self).__init__(**kwargs) + self.statuses = statuses + self.os_type = os_type + self.vm_size = vm_size + self.network_interface_id = network_interface_id + self.os_disk_id = os_disk_id + self.data_disk_ids = data_disk_ids + self.data_disks = data_disks diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py index 9b28579194b0..73269a4dd25d 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties.py @@ -42,10 +42,10 @@ class CostThresholdProperties(Model): 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, } - def __init__(self, threshold_id=None, percentage_threshold=None, display_on_chart=None, send_notification_when_exceeded=None, notification_sent=None): - super(CostThresholdProperties, self).__init__() - self.threshold_id = threshold_id - self.percentage_threshold = percentage_threshold - self.display_on_chart = display_on_chart - self.send_notification_when_exceeded = send_notification_when_exceeded - self.notification_sent = notification_sent + def __init__(self, **kwargs): + super(CostThresholdProperties, self).__init__(**kwargs) + self.threshold_id = kwargs.get('threshold_id', None) + self.percentage_threshold = kwargs.get('percentage_threshold', None) + self.display_on_chart = kwargs.get('display_on_chart', None) + self.send_notification_when_exceeded = kwargs.get('send_notification_when_exceeded', None) + self.notification_sent = kwargs.get('notification_sent', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py new file mode 100644 index 000000000000..fba335d6c3e5 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/cost_threshold_properties_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CostThresholdProperties(Model): + """Properties of a cost threshold item. + + :param threshold_id: The ID of the cost threshold item. + :type threshold_id: str + :param percentage_threshold: The value of the percentage cost threshold. + :type percentage_threshold: + ~azure.mgmt.devtestlabs.models.PercentageCostThresholdProperties + :param display_on_chart: Indicates whether this threshold will be + displayed on cost charts. Possible values include: 'Enabled', 'Disabled' + :type display_on_chart: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param send_notification_when_exceeded: Indicates whether notifications + will be sent when this threshold is exceeded. Possible values include: + 'Enabled', 'Disabled' + :type send_notification_when_exceeded: str or + ~azure.mgmt.devtestlabs.models.CostThresholdStatus + :param notification_sent: Indicates the datetime when notifications were + last sent for this threshold. + :type notification_sent: str + """ + + _attribute_map = { + 'threshold_id': {'key': 'thresholdId', 'type': 'str'}, + 'percentage_threshold': {'key': 'percentageThreshold', 'type': 'PercentageCostThresholdProperties'}, + 'display_on_chart': {'key': 'displayOnChart', 'type': 'str'}, + 'send_notification_when_exceeded': {'key': 'sendNotificationWhenExceeded', 'type': 'str'}, + 'notification_sent': {'key': 'notificationSent', 'type': 'str'}, + } + + def __init__(self, *, threshold_id: str=None, percentage_threshold=None, display_on_chart=None, send_notification_when_exceeded=None, notification_sent: str=None, **kwargs) -> None: + super(CostThresholdProperties, self).__init__(**kwargs) + self.threshold_id = threshold_id + self.percentage_threshold = percentage_threshold + self.display_on_chart = display_on_chart + self.send_notification_when_exceeded = send_notification_when_exceeded + self.notification_sent = notification_sent diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py index 78046859b502..136ee0481ee1 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image.py @@ -40,11 +40,25 @@ class CustomImage(Resource): :vartype creation_date: datetime :param managed_image_id: The Managed Image Id backing the custom image. :type managed_image_id: str - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource (Guid). - :type unique_identifier: str + :vartype unique_identifier: str """ _validation = { @@ -52,6 +66,8 @@ class CustomImage(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, } _attribute_map = { @@ -66,17 +82,25 @@ class CustomImage(Resource): 'author': {'key': 'properties.author', 'type': 'str'}, 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, vm=None, vhd=None, description=None, author=None, managed_image_id=None, provisioning_state=None, unique_identifier=None): - super(CustomImage, self).__init__(location=location, tags=tags) - self.vm = vm - self.vhd = vhd - self.description = description - self.author = author + def __init__(self, **kwargs): + super(CustomImage, self).__init__(**kwargs) + self.vm = kwargs.get('vm', None) + self.vhd = kwargs.get('vhd', None) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) self.creation_date = None - self.managed_image_id = managed_image_id - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + self.managed_image_id = kwargs.get('managed_image_id', None) + self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) + self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) + self.custom_image_plan = kwargs.get('custom_image_plan', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py new file mode 100644 index 000000000000..5ac36c53a6cd --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource import UpdateResource + + +class CustomImageFragment(UpdateResource): + """A custom image. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment + :param vhd: The VHD from which the image is to be created. + :type vhd: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(CustomImageFragment, self).__init__(**kwargs) + self.vm = kwargs.get('vm', None) + self.vhd = kwargs.get('vhd', None) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.managed_image_id = kwargs.get('managed_image_id', None) + self.managed_snapshot_id = kwargs.get('managed_snapshot_id', None) + self.data_disk_storage_info = kwargs.get('data_disk_storage_info', None) + self.custom_image_plan = kwargs.get('custom_image_plan', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py new file mode 100644 index 000000000000..a3ccac2274eb --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_fragment_py3.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource_py3 import UpdateResource + + +class CustomImageFragment(UpdateResource): + """A custom image. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVmFragment + :param vhd: The VHD from which the image is to be created. + :type vhd: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustomFragment + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfoFragment] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlanFragment + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVmFragment'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustomFragment'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfoFragment]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlanFragment'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, *, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(CustomImageFragment, self).__init__(tags=tags, **kwargs) + self.vm = vm + self.vhd = vhd + self.description = description + self.author = author + self.managed_image_id = managed_image_id + self.managed_snapshot_id = managed_snapshot_id + self.data_disk_storage_info = data_disk_storage_info + self.custom_image_plan = custom_image_plan + self.is_plan_authorized = is_plan_authorized diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py index bc8adf2af330..a1bd5ab66712 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py @@ -15,12 +15,14 @@ class CustomImagePropertiesCustom(Model): """Properties for creating a custom image from a VHD. + All required parameters must be populated in order to send to Azure. + :param image_name: The image name. :type image_name: str :param sys_prep: Indicates whether sysprep has been run on the VHD. :type sys_prep: bool - :param os_type: The OS type of the custom image (i.e. Windows, Linux). - Possible values include: 'Windows', 'Linux', 'None' + :param os_type: Required. The OS type of the custom image (i.e. Windows, + Linux). Possible values include: 'Windows', 'Linux', 'None' :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType """ @@ -34,8 +36,8 @@ class CustomImagePropertiesCustom(Model): 'os_type': {'key': 'osType', 'type': 'str'}, } - def __init__(self, os_type, image_name=None, sys_prep=None): - super(CustomImagePropertiesCustom, self).__init__() - self.image_name = image_name - self.sys_prep = sys_prep - self.os_type = os_type + def __init__(self, **kwargs): + super(CustomImagePropertiesCustom, self).__init__(**kwargs) + self.image_name = kwargs.get('image_name', None) + self.sys_prep = kwargs.get('sys_prep', None) + self.os_type = kwargs.get('os_type', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py new file mode 100644 index 000000000000..4fc581738e57 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomImagePropertiesCustomFragment(Model): + """Properties for creating a custom image from a VHD. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: The OS type of the custom image (i.e. Windows, Linux). + Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) + self.image_name = kwargs.get('image_name', None) + self.sys_prep = kwargs.get('sys_prep', None) + self.os_type = kwargs.get('os_type', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py new file mode 100644 index 000000000000..3869682ca53d --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_fragment_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomImagePropertiesCustomFragment(Model): + """Properties for creating a custom image from a VHD. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: The OS type of the custom image (i.e. Windows, Linux). + Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, *, image_name: str=None, sys_prep: bool=None, os_type=None, **kwargs) -> None: + super(CustomImagePropertiesCustomFragment, self).__init__(**kwargs) + self.image_name = image_name + self.sys_prep = sys_prep + self.os_type = os_type diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py new file mode 100644 index 000000000000..5aede6b5507c --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomImagePropertiesCustom(Model): + """Properties for creating a custom image from a VHD. + + All required parameters must be populated in order to send to Azure. + + :param image_name: The image name. + :type image_name: str + :param sys_prep: Indicates whether sysprep has been run on the VHD. + :type sys_prep: bool + :param os_type: Required. The OS type of the custom image (i.e. Windows, + Linux). Possible values include: 'Windows', 'Linux', 'None' + :type os_type: str or ~azure.mgmt.devtestlabs.models.CustomImageOsType + """ + + _validation = { + 'os_type': {'required': True}, + } + + _attribute_map = { + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'sys_prep': {'key': 'sysPrep', 'type': 'bool'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, *, os_type, image_name: str=None, sys_prep: bool=None, **kwargs) -> None: + super(CustomImagePropertiesCustom, self).__init__(**kwargs) + self.image_name = image_name + self.sys_prep = sys_prep + self.os_type = os_type diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py new file mode 100644 index 000000000000..37067a750936 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomImagePropertiesFromPlan(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py new file mode 100644 index 000000000000..b8db62a3738f --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomImagePropertiesFromPlanFragment(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py new file mode 100644 index 000000000000..159740e13c32 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_fragment_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomImagePropertiesFromPlanFragment(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: + super(CustomImagePropertiesFromPlanFragment, self).__init__(**kwargs) + self.id = id + self.publisher = publisher + self.offer = offer diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py new file mode 100644 index 000000000000..fcbfeea22012 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_plan_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomImagePropertiesFromPlan(Model): + """Properties for plan on a custom image. + + :param id: The id of the plan, equivalent to name of the plan + :type id: str + :param publisher: The publisher for the plan from the marketplace image + the custom image is derived from + :type publisher: str + :param offer: The offer for the plan from the marketplace image the custom + image is derived from + :type offer: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, publisher: str=None, offer: str=None, **kwargs) -> None: + super(CustomImagePropertiesFromPlan, self).__init__(**kwargs) + self.id = id + self.publisher = publisher + self.offer = offer diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py index 6de7dfb78349..d08828df0def 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm.py @@ -29,8 +29,8 @@ class CustomImagePropertiesFromVm(Model): 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, } - def __init__(self, source_vm_id=None, windows_os_info=None, linux_os_info=None): - super(CustomImagePropertiesFromVm, self).__init__() - self.source_vm_id = source_vm_id - self.windows_os_info = windows_os_info - self.linux_os_info = linux_os_info + def __init__(self, **kwargs): + super(CustomImagePropertiesFromVm, self).__init__(**kwargs) + self.source_vm_id = kwargs.get('source_vm_id', None) + self.windows_os_info = kwargs.get('windows_os_info', None) + self.linux_os_info = kwargs.get('linux_os_info', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py new file mode 100644 index 000000000000..c0274dab51e7 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomImagePropertiesFromVmFragment(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: + ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, + } + + def __init__(self, **kwargs): + super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) + self.source_vm_id = kwargs.get('source_vm_id', None) + self.windows_os_info = kwargs.get('windows_os_info', None) + self.linux_os_info = kwargs.get('linux_os_info', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py new file mode 100644 index 000000000000..437a4005cf1e --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_fragment_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomImagePropertiesFromVmFragment(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: + ~azure.mgmt.devtestlabs.models.WindowsOsInfoFragment + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfoFragment + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfoFragment'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfoFragment'}, + } + + def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: + super(CustomImagePropertiesFromVmFragment, self).__init__(**kwargs) + self.source_vm_id = source_vm_id + self.windows_os_info = windows_os_info + self.linux_os_info = linux_os_info diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py new file mode 100644 index 000000000000..02a54467b6a7 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_from_vm_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomImagePropertiesFromVm(Model): + """Properties for creating a custom image from a virtual machine. + + :param source_vm_id: The source vm identifier. + :type source_vm_id: str + :param windows_os_info: The Windows OS information of the VM. + :type windows_os_info: ~azure.mgmt.devtestlabs.models.WindowsOsInfo + :param linux_os_info: The Linux OS information of the VM. + :type linux_os_info: ~azure.mgmt.devtestlabs.models.LinuxOsInfo + """ + + _attribute_map = { + 'source_vm_id': {'key': 'sourceVmId', 'type': 'str'}, + 'windows_os_info': {'key': 'windowsOsInfo', 'type': 'WindowsOsInfo'}, + 'linux_os_info': {'key': 'linuxOsInfo', 'type': 'LinuxOsInfo'}, + } + + def __init__(self, *, source_vm_id: str=None, windows_os_info=None, linux_os_info=None, **kwargs) -> None: + super(CustomImagePropertiesFromVm, self).__init__(**kwargs) + self.source_vm_id = source_vm_id + self.windows_os_info = windows_os_info + self.linux_os_info = linux_os_info diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py new file mode 100644 index 000000000000..fd4736a3744b --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_py3.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class CustomImage(Resource): + """A custom image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param vm: The virtual machine from which the image is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromVm + :param vhd: The VHD from which the image is to be created. + :type vhd: ~azure.mgmt.devtestlabs.models.CustomImagePropertiesCustom + :param description: The description of the custom image. + :type description: str + :param author: The author of the custom image. + :type author: str + :ivar creation_date: The creation date of the custom image. + :vartype creation_date: datetime + :param managed_image_id: The Managed Image Id backing the custom image. + :type managed_image_id: str + :param managed_snapshot_id: The Managed Snapshot Id backing the custom + image. + :type managed_snapshot_id: str + :param data_disk_storage_info: Storage information about the data disks + present in the custom image + :type data_disk_storage_info: + list[~azure.mgmt.devtestlabs.models.DataDiskStorageTypeInfo] + :param custom_image_plan: Storage information about the plan related to + this custom image + :type custom_image_plan: + ~azure.mgmt.devtestlabs.models.CustomImagePropertiesFromPlan + :param is_plan_authorized: Whether or not the custom images underlying + offer/plan has been enabled for programmatic deployment + :type is_plan_authorized: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'vm': {'key': 'properties.vm', 'type': 'CustomImagePropertiesFromVm'}, + 'vhd': {'key': 'properties.vhd', 'type': 'CustomImagePropertiesCustom'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'managed_image_id': {'key': 'properties.managedImageId', 'type': 'str'}, + 'managed_snapshot_id': {'key': 'properties.managedSnapshotId', 'type': 'str'}, + 'data_disk_storage_info': {'key': 'properties.dataDiskStorageInfo', 'type': '[DataDiskStorageTypeInfo]'}, + 'custom_image_plan': {'key': 'properties.customImagePlan', 'type': 'CustomImagePropertiesFromPlan'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, vm=None, vhd=None, description: str=None, author: str=None, managed_image_id: str=None, managed_snapshot_id: str=None, data_disk_storage_info=None, custom_image_plan=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(CustomImage, self).__init__(location=location, tags=tags, **kwargs) + self.vm = vm + self.vhd = vhd + self.description = description + self.author = author + self.creation_date = None + self.managed_image_id = managed_image_id + self.managed_snapshot_id = managed_snapshot_id + self.data_disk_storage_info = data_disk_storage_info + self.custom_image_plan = custom_image_plan + self.is_plan_authorized = is_plan_authorized + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py index 6ae746095473..7bbfad08d256 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties.py @@ -34,8 +34,8 @@ class DataDiskProperties(Model): 'host_caching': {'key': 'hostCaching', 'type': 'str'}, } - def __init__(self, attach_new_data_disk_options=None, existing_lab_disk_id=None, host_caching=None): - super(DataDiskProperties, self).__init__() - self.attach_new_data_disk_options = attach_new_data_disk_options - self.existing_lab_disk_id = existing_lab_disk_id - self.host_caching = host_caching + def __init__(self, **kwargs): + super(DataDiskProperties, self).__init__(**kwargs) + self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) + self.host_caching = kwargs.get('host_caching', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py new file mode 100644 index 000000000000..71e152680e3f --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DataDiskPropertiesFragment(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskPropertiesFragment, self).__init__(**kwargs) + self.attach_new_data_disk_options = kwargs.get('attach_new_data_disk_options', None) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) + self.host_caching = kwargs.get('host_caching', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py new file mode 100644 index 000000000000..d709d92d7113 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_fragment_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DataDiskPropertiesFragment(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptionsFragment + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptionsFragment'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: + super(DataDiskPropertiesFragment, self).__init__(**kwargs) + self.attach_new_data_disk_options = attach_new_data_disk_options + self.existing_lab_disk_id = existing_lab_disk_id + self.host_caching = host_caching diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py new file mode 100644 index 000000000000..9e654d16cd45 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_properties_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DataDiskProperties(Model): + """Request body for adding a new or existing data disk to a virtual machine. + + :param attach_new_data_disk_options: Specifies options to attach a new + disk to the virtual machine. + :type attach_new_data_disk_options: + ~azure.mgmt.devtestlabs.models.AttachNewDataDiskOptions + :param existing_lab_disk_id: Specifies the existing lab disk id to attach + to virtual machine. + :type existing_lab_disk_id: str + :param host_caching: Caching option for a data disk (i.e. None, ReadOnly, + ReadWrite). Possible values include: 'None', 'ReadOnly', 'ReadWrite' + :type host_caching: str or + ~azure.mgmt.devtestlabs.models.HostCachingOptions + """ + + _attribute_map = { + 'attach_new_data_disk_options': {'key': 'attachNewDataDiskOptions', 'type': 'AttachNewDataDiskOptions'}, + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + 'host_caching': {'key': 'hostCaching', 'type': 'str'}, + } + + def __init__(self, *, attach_new_data_disk_options=None, existing_lab_disk_id: str=None, host_caching=None, **kwargs) -> None: + super(DataDiskProperties, self).__init__(**kwargs) + self.attach_new_data_disk_options = attach_new_data_disk_options + self.existing_lab_disk_id = existing_lab_disk_id + self.host_caching = host_caching diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py new file mode 100644 index 000000000000..68a97bf75845 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DataDiskStorageTypeInfo(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskStorageTypeInfo, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.storage_type = kwargs.get('storage_type', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py new file mode 100644 index 000000000000..62b512b1f863 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DataDiskStorageTypeInfoFragment(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.storage_type = kwargs.get('storage_type', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py new file mode 100644 index 000000000000..9a1c830a7dcb --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_fragment_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DataDiskStorageTypeInfoFragment(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: + super(DataDiskStorageTypeInfoFragment, self).__init__(**kwargs) + self.lun = lun + self.storage_type = storage_type diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py new file mode 100644 index 000000000000..d817ca84fdd8 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/data_disk_storage_type_info_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DataDiskStorageTypeInfo(Model): + """Storage information about the data disks present in the custom image. + + :param lun: Disk Lun + :type lun: str + :param storage_type: Disk Storage Type. Possible values include: + 'Standard', 'Premium' + :type storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + } + + def __init__(self, *, lun: str=None, storage_type=None, **kwargs) -> None: + super(DataDiskStorageTypeInfo, self).__init__(**kwargs) + self.lun = lun + self.storage_type = storage_type diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py index d47a5da42acd..7391a793dc1b 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py @@ -23,6 +23,6 @@ class DayDetails(Model): 'time': {'key': 'time', 'type': 'str'}, } - def __init__(self, time=None): - super(DayDetails, self).__init__() - self.time = time + def __init__(self, **kwargs): + super(DayDetails, self).__init__(**kwargs) + self.time = kwargs.get('time', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py index 02f13d321b33..b4f977d74fdf 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment.py @@ -23,6 +23,6 @@ class DayDetailsFragment(Model): 'time': {'key': 'time', 'type': 'str'}, } - def __init__(self, time=None): - super(DayDetailsFragment, self).__init__() - self.time = time + def __init__(self, **kwargs): + super(DayDetailsFragment, self).__init__(**kwargs) + self.time = kwargs.get('time', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py new file mode 100644 index 000000000000..38c15b48bc89 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_fragment_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DayDetailsFragment(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, time: str=None, **kwargs) -> None: + super(DayDetailsFragment, self).__init__(**kwargs) + self.time = time diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py new file mode 100644 index 000000000000..593e341169d8 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DayDetails(Model): + """Properties of a daily schedule. + + :param time: The time of day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, time: str=None, **kwargs) -> None: + super(DayDetails, self).__init__(**kwargs) + self.time = time diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py index 74d912927476..9e66b91c3832 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties.py @@ -24,6 +24,6 @@ class DetachDataDiskProperties(Model): 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, } - def __init__(self, existing_lab_disk_id=None): - super(DetachDataDiskProperties, self).__init__() - self.existing_lab_disk_id = existing_lab_disk_id + def __init__(self, **kwargs): + super(DetachDataDiskProperties, self).__init__(**kwargs) + self.existing_lab_disk_id = kwargs.get('existing_lab_disk_id', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py new file mode 100644 index 000000000000..ece9ea7842fb --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_data_disk_properties_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DetachDataDiskProperties(Model): + """Request body for detaching data disk from a virtual machine. + + :param existing_lab_disk_id: Specifies the disk resource ID to detach from + virtual machine. + :type existing_lab_disk_id: str + """ + + _attribute_map = { + 'existing_lab_disk_id': {'key': 'existingLabDiskId', 'type': 'str'}, + } + + def __init__(self, *, existing_lab_disk_id: str=None, **kwargs) -> None: + super(DetachDataDiskProperties, self).__init__(**kwargs) + self.existing_lab_disk_id = existing_lab_disk_id diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py index abb40aeb0edb..2b781ad4f7ec 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties.py @@ -24,6 +24,6 @@ class DetachDiskProperties(Model): 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, } - def __init__(self, leased_by_lab_vm_id=None): - super(DetachDiskProperties, self).__init__() - self.leased_by_lab_vm_id = leased_by_lab_vm_id + def __init__(self, **kwargs): + super(DetachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py new file mode 100644 index 000000000000..bc02a7d21dc2 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/detach_disk_properties_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DetachDiskProperties(Model): + """Properties of the disk to detach. + + :param leased_by_lab_vm_id: The resource ID of the Lab VM to which the + disk is attached. + :type leased_by_lab_vm_id: str + """ + + _attribute_map = { + 'leased_by_lab_vm_id': {'key': 'leasedByLabVmId', 'type': 'str'}, + } + + def __init__(self, *, leased_by_lab_vm_id: str=None, **kwargs) -> None: + super(DetachDiskProperties, self).__init__(**kwargs) + self.leased_by_lab_vm_id = leased_by_lab_vm_id diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py index f4380c3273a0..035e4b81b91c 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dev_test_labs_client_enums.py @@ -12,114 +12,114 @@ from enum import Enum -class EnableStatus(Enum): +class EnableStatus(str, Enum): enabled = "Enabled" disabled = "Disabled" -class NotificationStatus(Enum): - - disabled = "Disabled" - enabled = "Enabled" - - -class SourceControlType(Enum): +class SourceControlType(str, Enum): vso_git = "VsoGit" git_hub = "GitHub" -class StorageType(Enum): +class StorageType(str, Enum): standard = "Standard" premium = "Premium" -class CostThresholdStatus(Enum): +class CostThresholdStatus(str, Enum): enabled = "Enabled" disabled = "Disabled" -class WindowsOsState(Enum): +class WindowsOsState(str, Enum): non_sysprepped = "NonSysprepped" sysprep_requested = "SysprepRequested" sysprep_applied = "SysprepApplied" -class LinuxOsState(Enum): +class LinuxOsState(str, Enum): non_deprovisioned = "NonDeprovisioned" deprovision_requested = "DeprovisionRequested" deprovision_applied = "DeprovisionApplied" -class CustomImageOsType(Enum): +class CustomImageOsType(str, Enum): windows = "Windows" linux = "Linux" none = "None" -class HostCachingOptions(Enum): +class HostCachingOptions(str, Enum): none = "None" read_only = "ReadOnly" read_write = "ReadWrite" -class NotificationChannelEventType(Enum): +class NotificationChannelEventType(str, Enum): auto_shutdown = "AutoShutdown" cost = "Cost" -class TransportProtocol(Enum): +class TransportProtocol(str, Enum): tcp = "Tcp" udp = "Udp" -class VirtualMachineCreationSource(Enum): +class VirtualMachineCreationSource(str, Enum): from_custom_image = "FromCustomImage" from_gallery_image = "FromGalleryImage" -class FileUploadOptions(Enum): +class FileUploadOptions(str, Enum): upload_files_and_generate_sas_tokens = "UploadFilesAndGenerateSasTokens" none = "None" -class PremiumDataDisk(Enum): +class PremiumDataDisk(str, Enum): disabled = "Disabled" enabled = "Enabled" -class TargetCostStatus(Enum): +class EnvironmentPermission(str, Enum): + + reader = "Reader" + contributor = "Contributor" + + +class TargetCostStatus(str, Enum): enabled = "Enabled" disabled = "Disabled" -class ReportingCycleType(Enum): +class ReportingCycleType(str, Enum): calendar_month = "CalendarMonth" custom = "Custom" -class CostType(Enum): +class CostType(str, Enum): unavailable = "Unavailable" reported = "Reported" projected = "Projected" -class HttpStatusCode(Enum): +class HttpStatusCode(str, Enum): continue_enum = "Continue" switching_protocols = "SwitchingProtocols" @@ -165,13 +165,13 @@ class HttpStatusCode(Enum): http_version_not_supported = "HttpVersionNotSupported" -class PolicyStatus(Enum): +class PolicyStatus(str, Enum): enabled = "Enabled" disabled = "Disabled" -class PolicyFactName(Enum): +class PolicyFactName(str, Enum): user_owned_lab_vm_count = "UserOwnedLabVmCount" user_owned_lab_premium_vm_count = "UserOwnedLabPremiumVmCount" @@ -181,15 +181,17 @@ class PolicyFactName(Enum): gallery_image = "GalleryImage" user_owned_lab_vm_count_in_subnet = "UserOwnedLabVmCountInSubnet" lab_target_cost = "LabTargetCost" + environment_template = "EnvironmentTemplate" + schedule_edit_permission = "ScheduleEditPermission" -class PolicyEvaluatorType(Enum): +class PolicyEvaluatorType(str, Enum): allowed_values_policy = "AllowedValuesPolicy" max_value_policy = "MaxValuePolicy" -class UsagePermissionType(Enum): +class UsagePermissionType(str, Enum): default = "Default" deny = "Deny" diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py index 5e68664a3802..25e4d966f51d 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py @@ -49,11 +49,11 @@ class Disk(Resource): :param managed_disk_id: When backed by managed disk, this is the ID of the compute disk resource. :type managed_disk_id: str - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource (Guid). - :type unique_identifier: str + :vartype unique_identifier: str """ _validation = { @@ -61,6 +61,8 @@ class Disk(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, } _attribute_map = { @@ -81,15 +83,15 @@ class Disk(Resource): 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, disk_type=None, disk_size_gi_b=None, leased_by_lab_vm_id=None, disk_blob_name=None, disk_uri=None, host_caching=None, managed_disk_id=None, provisioning_state=None, unique_identifier=None): - super(Disk, self).__init__(location=location, tags=tags) - self.disk_type = disk_type - self.disk_size_gi_b = disk_size_gi_b - self.leased_by_lab_vm_id = leased_by_lab_vm_id - self.disk_blob_name = disk_blob_name - self.disk_uri = disk_uri + def __init__(self, **kwargs): + super(Disk, self).__init__(**kwargs) + self.disk_type = kwargs.get('disk_type', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + self.disk_blob_name = kwargs.get('disk_blob_name', None) + self.disk_uri = kwargs.get('disk_uri', None) self.created_date = None - self.host_caching = host_caching - self.managed_disk_id = managed_disk_id - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + self.host_caching = kwargs.get('host_caching', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py new file mode 100644 index 000000000000..95cf157219e5 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource import UpdateResource + + +class DiskFragment(UpdateResource): + """A Disk. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiskFragment, self).__init__(**kwargs) + self.disk_type = kwargs.get('disk_type', None) + self.disk_size_gi_b = kwargs.get('disk_size_gi_b', None) + self.leased_by_lab_vm_id = kwargs.get('leased_by_lab_vm_id', None) + self.disk_blob_name = kwargs.get('disk_blob_name', None) + self.disk_uri = kwargs.get('disk_uri', None) + self.host_caching = kwargs.get('host_caching', None) + self.managed_disk_id = kwargs.get('managed_disk_id', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py new file mode 100644 index 000000000000..13c21baa5075 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource_py3 import UpdateResource + + +class DiskFragment(UpdateResource): + """A Disk. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: + super(DiskFragment, self).__init__(tags=tags, **kwargs) + self.disk_type = disk_type + self.disk_size_gi_b = disk_size_gi_b + self.leased_by_lab_vm_id = leased_by_lab_vm_id + self.disk_blob_name = disk_blob_name + self.disk_uri = disk_uri + self.host_caching = host_caching + self.managed_disk_id = managed_disk_id diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py new file mode 100644 index 000000000000..6bc04918d86e --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class Disk(Resource): + """A Disk. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param disk_type: The storage type for the disk (i.e. Standard, Premium). + Possible values include: 'Standard', 'Premium' + :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param disk_size_gi_b: The size of the disk in GibiBytes. + :type disk_size_gi_b: int + :param leased_by_lab_vm_id: The resource ID of the VM to which this disk + is leased. + :type leased_by_lab_vm_id: str + :param disk_blob_name: When backed by a blob, the name of the VHD blob + without extension. + :type disk_blob_name: str + :param disk_uri: When backed by a blob, the URI of underlying blob. + :type disk_uri: str + :ivar created_date: The creation date of the disk. + :vartype created_date: datetime + :param host_caching: The host caching policy of the disk (i.e. None, + ReadOnly, ReadWrite). + :type host_caching: str + :param managed_disk_id: When backed by managed disk, this is the ID of the + compute disk resource. + :type managed_disk_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'disk_type': {'key': 'properties.diskType', 'type': 'str'}, + 'disk_size_gi_b': {'key': 'properties.diskSizeGiB', 'type': 'int'}, + 'leased_by_lab_vm_id': {'key': 'properties.leasedByLabVmId', 'type': 'str'}, + 'disk_blob_name': {'key': 'properties.diskBlobName', 'type': 'str'}, + 'disk_uri': {'key': 'properties.diskUri', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'host_caching': {'key': 'properties.hostCaching', 'type': 'str'}, + 'managed_disk_id': {'key': 'properties.managedDiskId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, disk_type=None, disk_size_gi_b: int=None, leased_by_lab_vm_id: str=None, disk_blob_name: str=None, disk_uri: str=None, host_caching: str=None, managed_disk_id: str=None, **kwargs) -> None: + super(Disk, self).__init__(location=location, tags=tags, **kwargs) + self.disk_type = disk_type + self.disk_size_gi_b = disk_size_gi_b + self.leased_by_lab_vm_id = leased_by_lab_vm_id + self.disk_blob_name = disk_blob_name + self.disk_uri = disk_uri + self.created_date = None + self.host_caching = host_caching + self.managed_disk_id = managed_disk_id + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py index 72770fd078d2..47f7a67992f7 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment.py @@ -40,11 +40,11 @@ class DtlEnvironment(Resource): :vartype resource_group_id: str :ivar created_by_user: The creator of the environment. :vartype created_by_user: str - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource (Guid). - :type unique_identifier: str + :vartype unique_identifier: str """ _validation = { @@ -53,6 +53,8 @@ class DtlEnvironment(Resource): 'type': {'readonly': True}, 'resource_group_id': {'readonly': True}, 'created_by_user': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, } _attribute_map = { @@ -69,11 +71,11 @@ class DtlEnvironment(Resource): 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, deployment_properties=None, arm_template_display_name=None, provisioning_state=None, unique_identifier=None): - super(DtlEnvironment, self).__init__(location=location, tags=tags) - self.deployment_properties = deployment_properties - self.arm_template_display_name = arm_template_display_name + def __init__(self, **kwargs): + super(DtlEnvironment, self).__init__(**kwargs) + self.deployment_properties = kwargs.get('deployment_properties', None) + self.arm_template_display_name = kwargs.get('arm_template_display_name', None) self.resource_group_id = None self.created_by_user = None - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py new file mode 100644 index 000000000000..14103673db5f --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource import UpdateResource + + +class DtlEnvironmentFragment(UpdateResource): + """An environment, which is essentially an ARM template deployment. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DtlEnvironmentFragment, self).__init__(**kwargs) + self.deployment_properties = kwargs.get('deployment_properties', None) + self.arm_template_display_name = kwargs.get('arm_template_display_name', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py new file mode 100644 index 000000000000..9cd4e5caa7bf --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_fragment_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource_py3 import UpdateResource + + +class DtlEnvironmentFragment(UpdateResource): + """An environment, which is essentially an ARM template deployment. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentPropertiesFragment + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentPropertiesFragment'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + } + + def __init__(self, *, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: + super(DtlEnvironmentFragment, self).__init__(tags=tags, **kwargs) + self.deployment_properties = deployment_properties + self.arm_template_display_name = arm_template_display_name diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py new file mode 100644 index 000000000000..f2fbb899f8cf --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/dtl_environment_py3.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class DtlEnvironment(Resource): + """An environment, which is essentially an ARM template deployment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param deployment_properties: The deployment properties of the + environment. + :type deployment_properties: + ~azure.mgmt.devtestlabs.models.EnvironmentDeploymentProperties + :param arm_template_display_name: The display name of the Azure Resource + Manager template that produced the environment. + :type arm_template_display_name: str + :ivar resource_group_id: The identifier of the resource group containing + the environment's resources. + :vartype resource_group_id: str + :ivar created_by_user: The creator of the environment. + :vartype created_by_user: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_group_id': {'readonly': True}, + 'created_by_user': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'deployment_properties': {'key': 'properties.deploymentProperties', 'type': 'EnvironmentDeploymentProperties'}, + 'arm_template_display_name': {'key': 'properties.armTemplateDisplayName', 'type': 'str'}, + 'resource_group_id': {'key': 'properties.resourceGroupId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, deployment_properties=None, arm_template_display_name: str=None, **kwargs) -> None: + super(DtlEnvironment, self).__init__(location=location, tags=tags, **kwargs) + self.deployment_properties = deployment_properties + self.arm_template_display_name = arm_template_display_name + self.resource_group_id = None + self.created_by_user = None + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py index 30d956e3e345..31dc62dfc89e 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties.py @@ -27,7 +27,7 @@ class EnvironmentDeploymentProperties(Model): 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, } - def __init__(self, arm_template_id=None, parameters=None): - super(EnvironmentDeploymentProperties, self).__init__() - self.arm_template_id = arm_template_id - self.parameters = parameters + def __init__(self, **kwargs): + super(EnvironmentDeploymentProperties, self).__init__(**kwargs) + self.arm_template_id = kwargs.get('arm_template_id', None) + self.parameters = kwargs.get('parameters', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py new file mode 100644 index 000000000000..e441cfd4a17d --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EnvironmentDeploymentPropertiesFragment(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, + } + + def __init__(self, **kwargs): + super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) + self.arm_template_id = kwargs.get('arm_template_id', None) + self.parameters = kwargs.get('parameters', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py new file mode 100644 index 000000000000..1a30a6aef98e --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_fragment_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EnvironmentDeploymentPropertiesFragment(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterPropertiesFragment] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterPropertiesFragment]'}, + } + + def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: + super(EnvironmentDeploymentPropertiesFragment, self).__init__(**kwargs) + self.arm_template_id = arm_template_id + self.parameters = parameters diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py new file mode 100644 index 000000000000..866bbe7d7ebf --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/environment_deployment_properties_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EnvironmentDeploymentProperties(Model): + """Properties of an environment deployment. + + :param arm_template_id: The Azure Resource Manager template's identifier. + :type arm_template_id: str + :param parameters: The parameters of the Azure Resource Manager template. + :type parameters: + list[~azure.mgmt.devtestlabs.models.ArmTemplateParameterProperties] + """ + + _attribute_map = { + 'arm_template_id': {'key': 'armTemplateId', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameterProperties]'}, + } + + def __init__(self, *, arm_template_id: str=None, parameters=None, **kwargs) -> None: + super(EnvironmentDeploymentProperties, self).__init__(**kwargs) + self.arm_template_id = arm_template_id + self.parameters = parameters diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py index 71301673c3fa..ec21cf9c743e 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties.py @@ -21,16 +21,20 @@ class EvaluatePoliciesProperties(Model): :type fact_data: str :param value_offset: The value offset. :type value_offset: str + :param user_object_id: The user for which policies will be evaluated + :type user_object_id: str """ _attribute_map = { 'fact_name': {'key': 'factName', 'type': 'str'}, 'fact_data': {'key': 'factData', 'type': 'str'}, 'value_offset': {'key': 'valueOffset', 'type': 'str'}, + 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, } - def __init__(self, fact_name=None, fact_data=None, value_offset=None): - super(EvaluatePoliciesProperties, self).__init__() - self.fact_name = fact_name - self.fact_data = fact_data - self.value_offset = value_offset + def __init__(self, **kwargs): + super(EvaluatePoliciesProperties, self).__init__(**kwargs) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.value_offset = kwargs.get('value_offset', None) + self.user_object_id = kwargs.get('user_object_id', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py new file mode 100644 index 000000000000..5f45b40617a1 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_properties_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EvaluatePoliciesProperties(Model): + """Properties for evaluating a policy set. + + :param fact_name: The fact name. + :type fact_name: str + :param fact_data: The fact data. + :type fact_data: str + :param value_offset: The value offset. + :type value_offset: str + :param user_object_id: The user for which policies will be evaluated + :type user_object_id: str + """ + + _attribute_map = { + 'fact_name': {'key': 'factName', 'type': 'str'}, + 'fact_data': {'key': 'factData', 'type': 'str'}, + 'value_offset': {'key': 'valueOffset', 'type': 'str'}, + 'user_object_id': {'key': 'userObjectId', 'type': 'str'}, + } + + def __init__(self, *, fact_name: str=None, fact_data: str=None, value_offset: str=None, user_object_id: str=None, **kwargs) -> None: + super(EvaluatePoliciesProperties, self).__init__(**kwargs) + self.fact_name = fact_name + self.fact_data = fact_data + self.value_offset = value_offset + self.user_object_id = user_object_id diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py index 20c0bf8fe723..3476c2176cd0 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request.py @@ -24,6 +24,6 @@ class EvaluatePoliciesRequest(Model): 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, } - def __init__(self, policies=None): - super(EvaluatePoliciesRequest, self).__init__() - self.policies = policies + def __init__(self, **kwargs): + super(EvaluatePoliciesRequest, self).__init__(**kwargs) + self.policies = kwargs.get('policies', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py new file mode 100644 index 000000000000..657e3a980fbb --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_request_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EvaluatePoliciesRequest(Model): + """Request body for evaluating a policy set. + + :param policies: Policies to evaluate. + :type policies: + list[~azure.mgmt.devtestlabs.models.EvaluatePoliciesProperties] + """ + + _attribute_map = { + 'policies': {'key': 'policies', 'type': '[EvaluatePoliciesProperties]'}, + } + + def __init__(self, *, policies=None, **kwargs) -> None: + super(EvaluatePoliciesRequest, self).__init__(**kwargs) + self.policies = policies diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py index 83b040c297d9..be1baad1d5a8 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response.py @@ -23,6 +23,6 @@ class EvaluatePoliciesResponse(Model): 'results': {'key': 'results', 'type': '[PolicySetResult]'}, } - def __init__(self, results=None): - super(EvaluatePoliciesResponse, self).__init__() - self.results = results + def __init__(self, **kwargs): + super(EvaluatePoliciesResponse, self).__init__(**kwargs) + self.results = kwargs.get('results', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py new file mode 100644 index 000000000000..166eb2130754 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/evaluate_policies_response_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EvaluatePoliciesResponse(Model): + """Response body for evaluating a policy set. + + :param results: Results of evaluating a policy set. + :type results: list[~azure.mgmt.devtestlabs.models.PolicySetResult] + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[PolicySetResult]'}, + } + + def __init__(self, *, results=None, **kwargs) -> None: + super(EvaluatePoliciesResponse, self).__init__(**kwargs) + self.results = results diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py index 4ec0268d79a3..98395545b13e 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event.py @@ -25,6 +25,6 @@ class Event(Model): 'event_name': {'key': 'eventName', 'type': 'str'}, } - def __init__(self, event_name=None): - super(Event, self).__init__() - self.event_name = event_name + def __init__(self, **kwargs): + super(Event, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py index 915a1ec7be2b..f6d18b5ba3e9 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py @@ -25,6 +25,6 @@ class EventFragment(Model): 'event_name': {'key': 'eventName', 'type': 'str'}, } - def __init__(self, event_name=None): - super(EventFragment, self).__init__() - self.event_name = event_name + def __init__(self, **kwargs): + super(EventFragment, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py new file mode 100644 index 000000000000..a785e4b7201a --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EventFragment(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, **kwargs) -> None: + super(EventFragment, self).__init__(**kwargs) + self.event_name = event_name diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py new file mode 100644 index 000000000000..faa50f83daea --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Event(Model): + """An event to be notified for. + + :param event_name: The event type for which this notification is enabled + (i.e. AutoShutdown, Cost). Possible values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, **kwargs) -> None: + super(Event, self).__init__(**kwargs) + self.event_name = event_name diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py index 13a149b32c7f..464db115a353 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters.py @@ -29,7 +29,7 @@ class ExportResourceUsageParameters(Model): 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, } - def __init__(self, blob_storage_absolute_sas_uri=None, usage_start_date=None): - super(ExportResourceUsageParameters, self).__init__() - self.blob_storage_absolute_sas_uri = blob_storage_absolute_sas_uri - self.usage_start_date = usage_start_date + def __init__(self, **kwargs): + super(ExportResourceUsageParameters, self).__init__(**kwargs) + self.blob_storage_absolute_sas_uri = kwargs.get('blob_storage_absolute_sas_uri', None) + self.usage_start_date = kwargs.get('usage_start_date', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py new file mode 100644 index 000000000000..f58597733273 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/export_resource_usage_parameters_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ExportResourceUsageParameters(Model): + """The parameters of the export operation. + + :param blob_storage_absolute_sas_uri: The blob storage absolute sas uri + with write permission to the container which the usage data needs to be + uploaded to. + :type blob_storage_absolute_sas_uri: str + :param usage_start_date: The start time of the usage. If not provided, + usage will be reported since the beginning of data collection. + :type usage_start_date: datetime + """ + + _attribute_map = { + 'blob_storage_absolute_sas_uri': {'key': 'blobStorageAbsoluteSasUri', 'type': 'str'}, + 'usage_start_date': {'key': 'usageStartDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, blob_storage_absolute_sas_uri: str=None, usage_start_date=None, **kwargs) -> None: + super(ExportResourceUsageParameters, self).__init__(**kwargs) + self.blob_storage_absolute_sas_uri = blob_storage_absolute_sas_uri + self.usage_start_date = usage_start_date diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py index 1019b2595cda..6f7f1ff89fca 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet.py @@ -26,7 +26,7 @@ class ExternalSubnet(Model): 'name': {'key': 'name', 'type': 'str'}, } - def __init__(self, id=None, name=None): - super(ExternalSubnet, self).__init__() - self.id = id - self.name = name + def __init__(self, **kwargs): + super(ExternalSubnet, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py index 88186c455930..ab2d5769fdab 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment.py @@ -26,7 +26,7 @@ class ExternalSubnetFragment(Model): 'name': {'key': 'name', 'type': 'str'}, } - def __init__(self, id=None, name=None): - super(ExternalSubnetFragment, self).__init__() - self.id = id - self.name = name + def __init__(self, **kwargs): + super(ExternalSubnetFragment, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py new file mode 100644 index 000000000000..f5f57186e9e5 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_fragment_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ExternalSubnetFragment(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(ExternalSubnetFragment, self).__init__(**kwargs) + self.id = id + self.name = name diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py new file mode 100644 index 000000000000..8a780e424313 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/external_subnet_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ExternalSubnet(Model): + """Subnet information as returned by the Microsoft.Network API. + + :param id: Gets or sets the identifier. + :type id: str + :param name: Gets or sets the name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(ExternalSubnet, self).__init__(**kwargs) + self.id = id + self.name = name diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py index d319327bad76..e4b18a64b9fa 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula.py @@ -41,11 +41,11 @@ class Formula(Resource): ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter :param vm: Information about a VM from which a formula is to be created. :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource (Guid). - :type unique_identifier: str + :vartype unique_identifier: str """ _validation = { @@ -53,6 +53,8 @@ class Formula(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, } _attribute_map = { @@ -71,13 +73,13 @@ class Formula(Resource): 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, description=None, author=None, os_type=None, formula_content=None, vm=None, provisioning_state=None, unique_identifier=None): - super(Formula, self).__init__(location=location, tags=tags) - self.description = description - self.author = author - self.os_type = os_type + def __init__(self, **kwargs): + super(Formula, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.os_type = kwargs.get('os_type', None) self.creation_date = None - self.formula_content = formula_content - self.vm = vm - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + self.formula_content = kwargs.get('formula_content', None) + self.vm = kwargs.get('vm', None) + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py new file mode 100644 index 000000000000..f072e37b3036 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource import UpdateResource + + +class FormulaFragment(UpdateResource): + """A formula for creating a VM, specifying an image base and other parameters. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, + } + + def __init__(self, **kwargs): + super(FormulaFragment, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.author = kwargs.get('author', None) + self.os_type = kwargs.get('os_type', None) + self.formula_content = kwargs.get('formula_content', None) + self.vm = kwargs.get('vm', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py new file mode 100644 index 000000000000..0f212fb85237 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_fragment_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource_py3 import UpdateResource + + +class FormulaFragment(UpdateResource): + """A formula for creating a VM, specifying an image base and other parameters. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameterFragment + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVmFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameterFragment'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVmFragment'}, + } + + def __init__(self, *, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: + super(FormulaFragment, self).__init__(tags=tags, **kwargs) + self.description = description + self.author = author + self.os_type = os_type + self.formula_content = formula_content + self.vm = vm diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py index f98cc0c9515d..0811ea901b40 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm.py @@ -24,6 +24,6 @@ class FormulaPropertiesFromVm(Model): 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, } - def __init__(self, lab_vm_id=None): - super(FormulaPropertiesFromVm, self).__init__() - self.lab_vm_id = lab_vm_id + def __init__(self, **kwargs): + super(FormulaPropertiesFromVm, self).__init__(**kwargs) + self.lab_vm_id = kwargs.get('lab_vm_id', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py new file mode 100644 index 000000000000..240d0674d57e --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FormulaPropertiesFromVmFragment(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) + self.lab_vm_id = kwargs.get('lab_vm_id', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py new file mode 100644 index 000000000000..1fff926ae626 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_fragment_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FormulaPropertiesFromVmFragment(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: + super(FormulaPropertiesFromVmFragment, self).__init__(**kwargs) + self.lab_vm_id = lab_vm_id diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py new file mode 100644 index 000000000000..2d7ac51274fe --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_properties_from_vm_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FormulaPropertiesFromVm(Model): + """Information about a VM from which a formula is to be created. + + :param lab_vm_id: The identifier of the VM from which a formula is to be + created. + :type lab_vm_id: str + """ + + _attribute_map = { + 'lab_vm_id': {'key': 'labVmId', 'type': 'str'}, + } + + def __init__(self, *, lab_vm_id: str=None, **kwargs) -> None: + super(FormulaPropertiesFromVm, self).__init__(**kwargs) + self.lab_vm_id = lab_vm_id diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py new file mode 100644 index 000000000000..907919f44485 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/formula_py3.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class Formula(Resource): + """A formula for creating a VM, specifying an image base and other parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the formula. + :type description: str + :param author: The author of the formula. + :type author: str + :param os_type: The OS type of the formula. + :type os_type: str + :ivar creation_date: The creation date of the formula. + :vartype creation_date: datetime + :param formula_content: The content of the formula. + :type formula_content: + ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter + :param vm: Information about a VM from which a formula is to be created. + :type vm: ~azure.mgmt.devtestlabs.models.FormulaPropertiesFromVm + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'formula_content': {'key': 'properties.formulaContent', 'type': 'LabVirtualMachineCreationParameter'}, + 'vm': {'key': 'properties.vm', 'type': 'FormulaPropertiesFromVm'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, description: str=None, author: str=None, os_type: str=None, formula_content=None, vm=None, **kwargs) -> None: + super(Formula, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.author = author + self.os_type = os_type + self.creation_date = None + self.formula_content = formula_content + self.vm = vm + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py index 04ae547d738f..c16dcfd6e97f 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image.py @@ -41,6 +41,11 @@ class GalleryImage(Resource): :type icon: str :param enabled: Indicates whether this gallery image is enabled. :type enabled: bool + :param plan_id: The third party plan that applies to this image + :type plan_id: str + :param is_plan_authorized: Indicates if the plan has been authorized for + programmatic deployment. + :type is_plan_authorized: bool """ _validation = { @@ -62,13 +67,17 @@ class GalleryImage(Resource): 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, 'icon': {'key': 'properties.icon', 'type': 'str'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, } - def __init__(self, location=None, tags=None, author=None, description=None, image_reference=None, icon=None, enabled=None): - super(GalleryImage, self).__init__(location=location, tags=tags) - self.author = author + def __init__(self, **kwargs): + super(GalleryImage, self).__init__(**kwargs) + self.author = kwargs.get('author', None) self.created_date = None - self.description = description - self.image_reference = image_reference - self.icon = icon - self.enabled = enabled + self.description = kwargs.get('description', None) + self.image_reference = kwargs.get('image_reference', None) + self.icon = kwargs.get('icon', None) + self.enabled = kwargs.get('enabled', None) + self.plan_id = kwargs.get('plan_id', None) + self.is_plan_authorized = kwargs.get('is_plan_authorized', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py new file mode 100644 index 000000000000..2097997302c9 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_py3.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class GalleryImage(Resource): + """A gallery image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param author: The author of the gallery image. + :type author: str + :ivar created_date: The creation date of the gallery image. + :vartype created_date: datetime + :param description: The description of the gallery image. + :type description: str + :param image_reference: The image reference of the gallery image. + :type image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param icon: The icon of the gallery image. + :type icon: str + :param enabled: Indicates whether this gallery image is enabled. + :type enabled: bool + :param plan_id: The third party plan that applies to this image + :type plan_id: str + :param is_plan_authorized: Indicates if the plan has been authorized for + programmatic deployment. + :type is_plan_authorized: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'author': {'key': 'properties.author', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'image_reference': {'key': 'properties.imageReference', 'type': 'GalleryImageReference'}, + 'icon': {'key': 'properties.icon', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'is_plan_authorized': {'key': 'properties.isPlanAuthorized', 'type': 'bool'}, + } + + def __init__(self, *, location: str=None, tags=None, author: str=None, description: str=None, image_reference=None, icon: str=None, enabled: bool=None, plan_id: str=None, is_plan_authorized: bool=None, **kwargs) -> None: + super(GalleryImage, self).__init__(location=location, tags=tags, **kwargs) + self.author = author + self.created_date = None + self.description = description + self.image_reference = image_reference + self.icon = icon + self.enabled = enabled + self.plan_id = plan_id + self.is_plan_authorized = is_plan_authorized diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py index 970ae9001780..c896911316fd 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference.py @@ -35,10 +35,10 @@ class GalleryImageReference(Model): 'version': {'key': 'version', 'type': 'str'}, } - def __init__(self, offer=None, publisher=None, sku=None, os_type=None, version=None): - super(GalleryImageReference, self).__init__() - self.offer = offer - self.publisher = publisher - self.sku = sku - self.os_type = os_type - self.version = version + def __init__(self, **kwargs): + super(GalleryImageReference, self).__init__(**kwargs) + self.offer = kwargs.get('offer', None) + self.publisher = kwargs.get('publisher', None) + self.sku = kwargs.get('sku', None) + self.os_type = kwargs.get('os_type', None) + self.version = kwargs.get('version', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py index 2d9236ef6e26..6bd266dbfbd8 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment.py @@ -35,10 +35,10 @@ class GalleryImageReferenceFragment(Model): 'version': {'key': 'version', 'type': 'str'}, } - def __init__(self, offer=None, publisher=None, sku=None, os_type=None, version=None): - super(GalleryImageReferenceFragment, self).__init__() - self.offer = offer - self.publisher = publisher - self.sku = sku - self.os_type = os_type - self.version = version + def __init__(self, **kwargs): + super(GalleryImageReferenceFragment, self).__init__(**kwargs) + self.offer = kwargs.get('offer', None) + self.publisher = kwargs.get('publisher', None) + self.sku = kwargs.get('sku', None) + self.os_type = kwargs.get('os_type', None) + self.version = kwargs.get('version', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py new file mode 100644 index 000000000000..3ebbfa4662f7 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_fragment_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GalleryImageReferenceFragment(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: + super(GalleryImageReferenceFragment, self).__init__(**kwargs) + self.offer = offer + self.publisher = publisher + self.sku = sku + self.os_type = os_type + self.version = version diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py new file mode 100644 index 000000000000..2541dc5b63e9 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/gallery_image_reference_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GalleryImageReference(Model): + """The reference information for an Azure Marketplace image. + + :param offer: The offer of the gallery image. + :type offer: str + :param publisher: The publisher of the gallery image. + :type publisher: str + :param sku: The SKU of the gallery image. + :type sku: str + :param os_type: The OS type of the gallery image. + :type os_type: str + :param version: The version of the gallery image. + :type version: str + """ + + _attribute_map = { + 'offer': {'key': 'offer', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, offer: str=None, publisher: str=None, sku: str=None, os_type: str=None, version: str=None, **kwargs) -> None: + super(GalleryImageReference, self).__init__(**kwargs) + self.offer = offer + self.publisher = publisher + self.sku = sku + self.os_type = os_type + self.version = version diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py index 0083ba4e26ca..3c5fb7b2fafd 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request.py @@ -35,9 +35,9 @@ class GenerateArmTemplateRequest(Model): 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, } - def __init__(self, virtual_machine_name=None, parameters=None, location=None, file_upload_options=None): - super(GenerateArmTemplateRequest, self).__init__() - self.virtual_machine_name = virtual_machine_name - self.parameters = parameters - self.location = location - self.file_upload_options = file_upload_options + def __init__(self, **kwargs): + super(GenerateArmTemplateRequest, self).__init__(**kwargs) + self.virtual_machine_name = kwargs.get('virtual_machine_name', None) + self.parameters = kwargs.get('parameters', None) + self.location = kwargs.get('location', None) + self.file_upload_options = kwargs.get('file_upload_options', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py new file mode 100644 index 000000000000..677085554d25 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_arm_template_request_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GenerateArmTemplateRequest(Model): + """Parameters for generating an ARM template for deploying artifacts. + + :param virtual_machine_name: The resource name of the virtual machine. + :type virtual_machine_name: str + :param parameters: The parameters of the ARM template. + :type parameters: list[~azure.mgmt.devtestlabs.models.ParameterInfo] + :param location: The location of the virtual machine. + :type location: str + :param file_upload_options: Options for uploading the files for the + artifact. UploadFilesAndGenerateSasTokens is the default value. Possible + values include: 'UploadFilesAndGenerateSasTokens', 'None' + :type file_upload_options: str or + ~azure.mgmt.devtestlabs.models.FileUploadOptions + """ + + _attribute_map = { + 'virtual_machine_name': {'key': 'virtualMachineName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ParameterInfo]'}, + 'location': {'key': 'location', 'type': 'str'}, + 'file_upload_options': {'key': 'fileUploadOptions', 'type': 'str'}, + } + + def __init__(self, *, virtual_machine_name: str=None, parameters=None, location: str=None, file_upload_options=None, **kwargs) -> None: + super(GenerateArmTemplateRequest, self).__init__(**kwargs) + self.virtual_machine_name = virtual_machine_name + self.parameters = parameters + self.location = location + self.file_upload_options = file_upload_options diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py index 5e8effbd48ed..801afae7e028 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter.py @@ -23,6 +23,6 @@ class GenerateUploadUriParameter(Model): 'blob_name': {'key': 'blobName', 'type': 'str'}, } - def __init__(self, blob_name=None): - super(GenerateUploadUriParameter, self).__init__() - self.blob_name = blob_name + def __init__(self, **kwargs): + super(GenerateUploadUriParameter, self).__init__(**kwargs) + self.blob_name = kwargs.get('blob_name', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py new file mode 100644 index 000000000000..ebc5724f0614 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_parameter_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GenerateUploadUriParameter(Model): + """Properties for generating an upload URI. + + :param blob_name: The blob name of the upload URI. + :type blob_name: str + """ + + _attribute_map = { + 'blob_name': {'key': 'blobName', 'type': 'str'}, + } + + def __init__(self, *, blob_name: str=None, **kwargs) -> None: + super(GenerateUploadUriParameter, self).__init__(**kwargs) + self.blob_name = blob_name diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py index 0b188ff767c7..77855e03a546 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py @@ -23,6 +23,6 @@ class GenerateUploadUriResponse(Model): 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, } - def __init__(self, upload_uri=None): - super(GenerateUploadUriResponse, self).__init__() - self.upload_uri = upload_uri + def __init__(self, **kwargs): + super(GenerateUploadUriResponse, self).__init__(**kwargs) + self.upload_uri = kwargs.get('upload_uri', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py new file mode 100644 index 000000000000..933e7cedb40b --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GenerateUploadUriResponse(Model): + """Reponse body for generating an upload URI. + + :param upload_uri: The upload URI for the VHD. + :type upload_uri: str + """ + + _attribute_map = { + 'upload_uri': {'key': 'uploadUri', 'type': 'str'}, + } + + def __init__(self, *, upload_uri: str=None, **kwargs) -> None: + super(GenerateUploadUriResponse, self).__init__(**kwargs) + self.upload_uri = upload_uri diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py index fa01c9c849ea..e310a1bbc923 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details.py @@ -23,6 +23,6 @@ class HourDetails(Model): 'minute': {'key': 'minute', 'type': 'int'}, } - def __init__(self, minute=None): - super(HourDetails, self).__init__() - self.minute = minute + def __init__(self, **kwargs): + super(HourDetails, self).__init__(**kwargs) + self.minute = kwargs.get('minute', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py index f84f791583d8..3a41af20481d 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment.py @@ -23,6 +23,6 @@ class HourDetailsFragment(Model): 'minute': {'key': 'minute', 'type': 'int'}, } - def __init__(self, minute=None): - super(HourDetailsFragment, self).__init__() - self.minute = minute + def __init__(self, **kwargs): + super(HourDetailsFragment, self).__init__(**kwargs) + self.minute = kwargs.get('minute', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py new file mode 100644 index 000000000000..afa962a3c628 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_fragment_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HourDetailsFragment(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, *, minute: int=None, **kwargs) -> None: + super(HourDetailsFragment, self).__init__(**kwargs) + self.minute = minute diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py new file mode 100644 index 000000000000..52c323352b24 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/hour_details_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HourDetails(Model): + """Properties of an hourly schedule. + + :param minute: Minutes of the hour the schedule will run. + :type minute: int + """ + + _attribute_map = { + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__(self, *, minute: int=None, **kwargs) -> None: + super(HourDetails, self).__init__(**kwargs) + self.minute = minute diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py index 1810ff2b5db5..ed4b127fc39c 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties.py @@ -32,9 +32,9 @@ class IdentityProperties(Model): 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, } - def __init__(self, type=None, principal_id=None, tenant_id=None, client_secret_url=None): - super(IdentityProperties, self).__init__() - self.type = type - self.principal_id = principal_id - self.tenant_id = tenant_id - self.client_secret_url = client_secret_url + def __init__(self, **kwargs): + super(IdentityProperties, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.client_secret_url = kwargs.get('client_secret_url', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py new file mode 100644 index 000000000000..63fb90a1b974 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/identity_properties_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IdentityProperties(Model): + """Properties of a managed identity. + + :param type: Managed identity. + :type type: str + :param principal_id: The principal id of resource identity. + :type principal_id: str + :param tenant_id: The tenant identifier of resource. + :type tenant_id: str + :param client_secret_url: The client secret URL of the identity. + :type client_secret_url: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'client_secret_url': {'key': 'clientSecretUrl', 'type': 'str'}, + } + + def __init__(self, *, type: str=None, principal_id: str=None, tenant_id: str=None, client_secret_url: str=None, **kwargs) -> None: + super(IdentityProperties, self).__init__(**kwargs) + self.type = type + self.principal_id = principal_id + self.tenant_id = tenant_id + self.client_secret_url = client_secret_url diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py new file mode 100644 index 000000000000..0c910e9b203e --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ImportLabVirtualMachineRequest(Model): + """This represents the payload required to import a virtual machine from a + different lab into the current one. + + :param source_virtual_machine_resource_id: The full resource ID of the + virtual machine to be imported. + :type source_virtual_machine_resource_id: str + :param destination_virtual_machine_name: The name of the virtual machine + in the destination lab + :type destination_virtual_machine_name: str + """ + + _attribute_map = { + 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, + 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) + self.source_virtual_machine_resource_id = kwargs.get('source_virtual_machine_resource_id', None) + self.destination_virtual_machine_name = kwargs.get('destination_virtual_machine_name', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py new file mode 100644 index 000000000000..6ca10ecff7a6 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/import_lab_virtual_machine_request_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ImportLabVirtualMachineRequest(Model): + """This represents the payload required to import a virtual machine from a + different lab into the current one. + + :param source_virtual_machine_resource_id: The full resource ID of the + virtual machine to be imported. + :type source_virtual_machine_resource_id: str + :param destination_virtual_machine_name: The name of the virtual machine + in the destination lab + :type destination_virtual_machine_name: str + """ + + _attribute_map = { + 'source_virtual_machine_resource_id': {'key': 'sourceVirtualMachineResourceId', 'type': 'str'}, + 'destination_virtual_machine_name': {'key': 'destinationVirtualMachineName', 'type': 'str'}, + } + + def __init__(self, *, source_virtual_machine_resource_id: str=None, destination_virtual_machine_name: str=None, **kwargs) -> None: + super(ImportLabVirtualMachineRequest, self).__init__(**kwargs) + self.source_virtual_machine_resource_id = source_virtual_machine_resource_id + self.destination_virtual_machine_name = destination_virtual_machine_name diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py index 3cc186cba32c..56d745d71893 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule.py @@ -35,8 +35,8 @@ class InboundNatRule(Model): 'backend_port': {'key': 'backendPort', 'type': 'int'}, } - def __init__(self, transport_protocol=None, frontend_port=None, backend_port=None): - super(InboundNatRule, self).__init__() - self.transport_protocol = transport_protocol - self.frontend_port = frontend_port - self.backend_port = backend_port + def __init__(self, **kwargs): + super(InboundNatRule, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.frontend_port = kwargs.get('frontend_port', None) + self.backend_port = kwargs.get('backend_port', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py index 18cb319dec0e..034404f9923f 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment.py @@ -35,8 +35,8 @@ class InboundNatRuleFragment(Model): 'backend_port': {'key': 'backendPort', 'type': 'int'}, } - def __init__(self, transport_protocol=None, frontend_port=None, backend_port=None): - super(InboundNatRuleFragment, self).__init__() - self.transport_protocol = transport_protocol - self.frontend_port = frontend_port - self.backend_port = backend_port + def __init__(self, **kwargs): + super(InboundNatRuleFragment, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.frontend_port = kwargs.get('frontend_port', None) + self.backend_port = kwargs.get('backend_port', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py new file mode 100644 index 000000000000..397d4c523e32 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_fragment_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class InboundNatRuleFragment(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: + super(InboundNatRuleFragment, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.frontend_port = frontend_port + self.backend_port = backend_port diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py new file mode 100644 index 000000000000..9ec4bd8a3d52 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/inbound_nat_rule_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class InboundNatRule(Model): + """A rule for NAT - exposing a VM's port (backendPort) on the public IP + address using a load balancer. + + :param transport_protocol: The transport protocol for the endpoint. + Possible values include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param frontend_port: The external endpoint port of the inbound + connection. Possible values range between 1 and 65535, inclusive. If + unspecified, a value will be allocated automatically. + :type frontend_port: int + :param backend_port: The port to which the external traffic will be + redirected. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, frontend_port: int=None, backend_port: int=None, **kwargs) -> None: + super(InboundNatRule, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.frontend_port = frontend_port + self.backend_port = backend_port diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py index 380b85c1810a..e495c96e01fa 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab.py @@ -44,6 +44,14 @@ class Lab(Resource): Premium or Standard. Default is Premium. Possible values include: 'Standard', 'Premium' :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] :ivar created_date: The creation date of the lab. :vartype created_date: datetime :param premium_data_disks: The setting to enable usage of premium data @@ -54,11 +62,37 @@ class Lab(Resource): allowed. Possible values include: 'Disabled', 'Enabled' :type premium_data_disks: str or ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties + :ivar vm_creation_resource_group: The resource group in which lab virtual + machines will be created in. + :vartype vm_creation_resource_group: str + :ivar public_ip_id: The public IP address for the lab's load balancer. + :vartype public_ip_id: str + :ivar load_balancer_id: The load balancer used to for lab VMs that use + shared IP address. + :vartype load_balancer_id: str + :ivar network_security_group_id: The Network Security Group attached to + the lab VMs Network interfaces to restrict open ports. + :vartype network_security_group_id: str + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource (Guid). - :type unique_identifier: str + :vartype unique_identifier: str """ _validation = { @@ -71,6 +105,12 @@ class Lab(Resource): 'premium_data_disk_storage_account': {'readonly': True}, 'vault_name': {'readonly': True}, 'created_date': {'readonly': True}, + 'vm_creation_resource_group': {'readonly': True}, + 'public_ip_id': {'readonly': True}, + 'load_balancer_id': {'readonly': True}, + 'network_security_group_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, } _attribute_map = { @@ -85,21 +125,41 @@ class Lab(Resource): 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, + 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, + 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, + 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, + 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, lab_storage_type=None, premium_data_disks=None, provisioning_state=None, unique_identifier=None): - super(Lab, self).__init__(location=location, tags=tags) + def __init__(self, **kwargs): + super(Lab, self).__init__(**kwargs) self.default_storage_account = None self.default_premium_storage_account = None self.artifacts_storage_account = None self.premium_data_disk_storage_account = None self.vault_name = None - self.lab_storage_type = lab_storage_type + self.lab_storage_type = kwargs.get('lab_storage_type', None) + self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) + self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) self.created_date = None - self.premium_data_disks = premium_data_disks - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + self.premium_data_disks = kwargs.get('premium_data_disks', None) + self.environment_permission = kwargs.get('environment_permission', None) + self.announcement = kwargs.get('announcement', None) + self.support = kwargs.get('support', None) + self.vm_creation_resource_group = None + self.public_ip_id = None + self.load_balancer_id = None + self.network_security_group_id = None + self.extended_properties = kwargs.get('extended_properties', None) + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py new file mode 100644 index 000000000000..aee243079a09 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabAnnouncementProperties(Model): + """Properties of a lab's announcement banner. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabAnnouncementProperties, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.markdown = kwargs.get('markdown', None) + self.enabled = kwargs.get('enabled', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.expired = kwargs.get('expired', None) + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py new file mode 100644 index 000000000000..9d82a4819afa --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabAnnouncementPropertiesFragment(Model): + """Properties of a lab's announcement banner. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.markdown = kwargs.get('markdown', None) + self.enabled = kwargs.get('enabled', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.expired = kwargs.get('expired', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py new file mode 100644 index 000000000000..33eea147dcf1 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_fragment_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabAnnouncementPropertiesFragment(Model): + """Properties of a lab's announcement banner. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + } + + def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: + super(LabAnnouncementPropertiesFragment, self).__init__(**kwargs) + self.title = title + self.markdown = markdown + self.enabled = enabled + self.expiration_date = expiration_date + self.expired = expired diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py new file mode 100644 index 000000000000..3d818d58a02f --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_announcement_properties_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabAnnouncementProperties(Model): + """Properties of a lab's announcement banner. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param title: The plain text title for the lab announcement + :type title: str + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + :param enabled: Is the lab announcement active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param expiration_date: The time at which the announcement expires (null + for never) + :type expiration_date: datetime + :param expired: Has this announcement expired? + :type expired: bool + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'expired': {'key': 'expired', 'type': 'bool'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, title: str=None, markdown: str=None, enabled=None, expiration_date=None, expired: bool=None, **kwargs) -> None: + super(LabAnnouncementProperties, self).__init__(**kwargs) + self.title = title + self.markdown = markdown + self.enabled = enabled + self.expiration_date = expiration_date + self.expired = expired + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py index 3d7ff9651f68..6825b1e82b74 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost.py @@ -47,11 +47,11 @@ class LabCost(Resource): :type end_date_time: datetime :param created_date: The creation date of the cost. :type created_date: datetime - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource (Guid). - :type unique_identifier: str + :vartype unique_identifier: str """ _validation = { @@ -61,6 +61,8 @@ class LabCost(Resource): 'lab_cost_summary': {'readonly': True}, 'lab_cost_details': {'readonly': True}, 'resource_costs': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, } _attribute_map = { @@ -81,15 +83,15 @@ class LabCost(Resource): 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, target_cost=None, currency_code=None, start_date_time=None, end_date_time=None, created_date=None, provisioning_state=None, unique_identifier=None): - super(LabCost, self).__init__(location=location, tags=tags) - self.target_cost = target_cost + def __init__(self, **kwargs): + super(LabCost, self).__init__(**kwargs) + self.target_cost = kwargs.get('target_cost', None) self.lab_cost_summary = None self.lab_cost_details = None self.resource_costs = None - self.currency_code = currency_code - self.start_date_time = start_date_time - self.end_date_time = end_date_time - self.created_date = created_date - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + self.currency_code = kwargs.get('currency_code', None) + self.start_date_time = kwargs.get('start_date_time', None) + self.end_date_time = kwargs.get('end_date_time', None) + self.created_date = kwargs.get('created_date', None) + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py index 59f832e389b4..ac7c70074036 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties.py @@ -30,8 +30,8 @@ class LabCostDetailsProperties(Model): 'cost_type': {'key': 'costType', 'type': 'str'}, } - def __init__(self, date_property=None, cost=None, cost_type=None): - super(LabCostDetailsProperties, self).__init__() - self.date_property = date_property - self.cost = cost - self.cost_type = cost_type + def __init__(self, **kwargs): + super(LabCostDetailsProperties, self).__init__(**kwargs) + self.date_property = kwargs.get('date_property', None) + self.cost = kwargs.get('cost', None) + self.cost_type = kwargs.get('cost_type', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py new file mode 100644 index 000000000000..f6690c8c2184 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_details_properties_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabCostDetailsProperties(Model): + """The properties of a lab cost item. + + :param date_property: The date of the cost item. + :type date_property: datetime + :param cost: The cost component of the cost item. + :type cost: float + :param cost_type: The type of the cost. Possible values include: + 'Unavailable', 'Reported', 'Projected' + :type cost_type: str or ~azure.mgmt.devtestlabs.models.CostType + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'cost': {'key': 'cost', 'type': 'float'}, + 'cost_type': {'key': 'costType', 'type': 'str'}, + } + + def __init__(self, *, date_property=None, cost: float=None, cost_type=None, **kwargs) -> None: + super(LabCostDetailsProperties, self).__init__(**kwargs) + self.date_property = date_property + self.cost = cost + self.cost_type = cost_type diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py new file mode 100644 index 000000000000..cef3ac68fdf8 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_py3.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class LabCost(Resource): + """A cost item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param target_cost: The target cost properties + :type target_cost: ~azure.mgmt.devtestlabs.models.TargetCostProperties + :ivar lab_cost_summary: The lab cost summary component of the cost data. + :vartype lab_cost_summary: + ~azure.mgmt.devtestlabs.models.LabCostSummaryProperties + :ivar lab_cost_details: The lab cost details component of the cost data. + :vartype lab_cost_details: + list[~azure.mgmt.devtestlabs.models.LabCostDetailsProperties] + :ivar resource_costs: The resource cost component of the cost data. + :vartype resource_costs: + list[~azure.mgmt.devtestlabs.models.LabResourceCostProperties] + :param currency_code: The currency code of the cost. + :type currency_code: str + :param start_date_time: The start time of the cost data. + :type start_date_time: datetime + :param end_date_time: The end time of the cost data. + :type end_date_time: datetime + :param created_date: The creation date of the cost. + :type created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'lab_cost_summary': {'readonly': True}, + 'lab_cost_details': {'readonly': True}, + 'resource_costs': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'target_cost': {'key': 'properties.targetCost', 'type': 'TargetCostProperties'}, + 'lab_cost_summary': {'key': 'properties.labCostSummary', 'type': 'LabCostSummaryProperties'}, + 'lab_cost_details': {'key': 'properties.labCostDetails', 'type': '[LabCostDetailsProperties]'}, + 'resource_costs': {'key': 'properties.resourceCosts', 'type': '[LabResourceCostProperties]'}, + 'currency_code': {'key': 'properties.currencyCode', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'end_date_time': {'key': 'properties.endDateTime', 'type': 'iso-8601'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, target_cost=None, currency_code: str=None, start_date_time=None, end_date_time=None, created_date=None, **kwargs) -> None: + super(LabCost, self).__init__(location=location, tags=tags, **kwargs) + self.target_cost = target_cost + self.lab_cost_summary = None + self.lab_cost_details = None + self.resource_costs = None + self.currency_code = currency_code + self.start_date_time = start_date_time + self.end_date_time = end_date_time + self.created_date = created_date + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py index 7e708b7b130e..edeb814ef472 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties.py @@ -23,6 +23,6 @@ class LabCostSummaryProperties(Model): 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, } - def __init__(self, estimated_lab_cost=None): - super(LabCostSummaryProperties, self).__init__() - self.estimated_lab_cost = estimated_lab_cost + def __init__(self, **kwargs): + super(LabCostSummaryProperties, self).__init__(**kwargs) + self.estimated_lab_cost = kwargs.get('estimated_lab_cost', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py new file mode 100644 index 000000000000..df5a84f3e609 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_cost_summary_properties_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabCostSummaryProperties(Model): + """The properties of the cost summary. + + :param estimated_lab_cost: The cost component of the cost item. + :type estimated_lab_cost: float + """ + + _attribute_map = { + 'estimated_lab_cost': {'key': 'estimatedLabCost', 'type': 'float'}, + } + + def __init__(self, *, estimated_lab_cost: float=None, **kwargs) -> None: + super(LabCostSummaryProperties, self).__init__(**kwargs) + self.estimated_lab_cost = estimated_lab_cost diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py index 39d557730627..2ad6dc84b4ae 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment.py @@ -9,29 +9,26 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .update_resource import UpdateResource -class LabFragment(Resource): +class LabFragment(UpdateResource): """A lab. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str :param tags: The tags of the resource. :type tags: dict[str, str] :param lab_storage_type: Type of storage used by the lab. It can be either Premium or Standard. Default is Premium. Possible values include: 'Standard', 'Premium' :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] :param premium_data_disks: The setting to enable usage of premium data disks. When its value is 'Enabled', creation of standard or premium data disks is @@ -40,34 +37,42 @@ class LabFragment(Resource): allowed. Possible values include: 'Disabled', 'Enabled' :type premium_data_disks: str or ~azure.mgmt.devtestlabs.models.PremiumDataDisk - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource - (Guid). - :type unique_identifier: str + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, } - def __init__(self, location=None, tags=None, lab_storage_type=None, premium_data_disks=None, provisioning_state=None, unique_identifier=None): - super(LabFragment, self).__init__(location=location, tags=tags) - self.lab_storage_type = lab_storage_type - self.premium_data_disks = premium_data_disks - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + def __init__(self, **kwargs): + super(LabFragment, self).__init__(**kwargs) + self.lab_storage_type = kwargs.get('lab_storage_type', None) + self.mandatory_artifacts_resource_ids_linux = kwargs.get('mandatory_artifacts_resource_ids_linux', None) + self.mandatory_artifacts_resource_ids_windows = kwargs.get('mandatory_artifacts_resource_ids_windows', None) + self.premium_data_disks = kwargs.get('premium_data_disks', None) + self.environment_permission = kwargs.get('environment_permission', None) + self.announcement = kwargs.get('announcement', None) + self.support = kwargs.get('support', None) + self.extended_properties = kwargs.get('extended_properties', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py new file mode 100644 index 000000000000..c5aa5b816807 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_fragment_py3.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource_py3 import UpdateResource + + +class LabFragment(UpdateResource): + """A lab. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementPropertiesFragment + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportPropertiesFragment + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementPropertiesFragment'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportPropertiesFragment'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: + super(LabFragment, self).__init__(tags=tags, **kwargs) + self.lab_storage_type = lab_storage_type + self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux + self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows + self.premium_data_disks = premium_data_disks + self.environment_permission = environment_permission + self.announcement = announcement + self.support = support + self.extended_properties = extended_properties diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py new file mode 100644 index 000000000000..ec30462d9336 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_py3.py @@ -0,0 +1,165 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class Lab(Resource): + """A lab. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :ivar default_storage_account: The lab's default storage account. + :vartype default_storage_account: str + :ivar default_premium_storage_account: The lab's default premium storage + account. + :vartype default_premium_storage_account: str + :ivar artifacts_storage_account: The lab's artifact storage account. + :vartype artifacts_storage_account: str + :ivar premium_data_disk_storage_account: The lab's premium data disk + storage account. + :vartype premium_data_disk_storage_account: str + :ivar vault_name: The lab's Key vault. + :vartype vault_name: str + :param lab_storage_type: Type of storage used by the lab. It can be either + Premium or Standard. Default is Premium. Possible values include: + 'Standard', 'Premium' + :type lab_storage_type: str or ~azure.mgmt.devtestlabs.models.StorageType + :param mandatory_artifacts_resource_ids_linux: The ordered list of + artifact resource IDs that should be applied on all Linux VM creations by + default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_linux: list[str] + :param mandatory_artifacts_resource_ids_windows: The ordered list of + artifact resource IDs that should be applied on all Windows VM creations + by default, prior to the artifacts specified by the user. + :type mandatory_artifacts_resource_ids_windows: list[str] + :ivar created_date: The creation date of the lab. + :vartype created_date: datetime + :param premium_data_disks: The setting to enable usage of premium data + disks. + When its value is 'Enabled', creation of standard or premium data disks is + allowed. + When its value is 'Disabled', only creation of standard data disks is + allowed. Possible values include: 'Disabled', 'Enabled' + :type premium_data_disks: str or + ~azure.mgmt.devtestlabs.models.PremiumDataDisk + :param environment_permission: The access rights to be granted to the user + when provisioning an environment. Possible values include: 'Reader', + 'Contributor' + :type environment_permission: str or + ~azure.mgmt.devtestlabs.models.EnvironmentPermission + :param announcement: The properties of any lab announcement associated + with this lab + :type announcement: + ~azure.mgmt.devtestlabs.models.LabAnnouncementProperties + :param support: The properties of any lab support message associated with + this lab + :type support: ~azure.mgmt.devtestlabs.models.LabSupportProperties + :ivar vm_creation_resource_group: The resource group in which lab virtual + machines will be created in. + :vartype vm_creation_resource_group: str + :ivar public_ip_id: The public IP address for the lab's load balancer. + :vartype public_ip_id: str + :ivar load_balancer_id: The load balancer used to for lab VMs that use + shared IP address. + :vartype load_balancer_id: str + :ivar network_security_group_id: The Network Security Group attached to + the lab VMs Network interfaces to restrict open ports. + :vartype network_security_group_id: str + :param extended_properties: Extended properties of the lab used for + experimental features + :type extended_properties: dict[str, str] + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'default_storage_account': {'readonly': True}, + 'default_premium_storage_account': {'readonly': True}, + 'artifacts_storage_account': {'readonly': True}, + 'premium_data_disk_storage_account': {'readonly': True}, + 'vault_name': {'readonly': True}, + 'created_date': {'readonly': True}, + 'vm_creation_resource_group': {'readonly': True}, + 'public_ip_id': {'readonly': True}, + 'load_balancer_id': {'readonly': True}, + 'network_security_group_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'default_storage_account': {'key': 'properties.defaultStorageAccount', 'type': 'str'}, + 'default_premium_storage_account': {'key': 'properties.defaultPremiumStorageAccount', 'type': 'str'}, + 'artifacts_storage_account': {'key': 'properties.artifactsStorageAccount', 'type': 'str'}, + 'premium_data_disk_storage_account': {'key': 'properties.premiumDataDiskStorageAccount', 'type': 'str'}, + 'vault_name': {'key': 'properties.vaultName', 'type': 'str'}, + 'lab_storage_type': {'key': 'properties.labStorageType', 'type': 'str'}, + 'mandatory_artifacts_resource_ids_linux': {'key': 'properties.mandatoryArtifactsResourceIdsLinux', 'type': '[str]'}, + 'mandatory_artifacts_resource_ids_windows': {'key': 'properties.mandatoryArtifactsResourceIdsWindows', 'type': '[str]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'premium_data_disks': {'key': 'properties.premiumDataDisks', 'type': 'str'}, + 'environment_permission': {'key': 'properties.environmentPermission', 'type': 'str'}, + 'announcement': {'key': 'properties.announcement', 'type': 'LabAnnouncementProperties'}, + 'support': {'key': 'properties.support', 'type': 'LabSupportProperties'}, + 'vm_creation_resource_group': {'key': 'properties.vmCreationResourceGroup', 'type': 'str'}, + 'public_ip_id': {'key': 'properties.publicIpId', 'type': 'str'}, + 'load_balancer_id': {'key': 'properties.loadBalancerId', 'type': 'str'}, + 'network_security_group_id': {'key': 'properties.networkSecurityGroupId', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, lab_storage_type=None, mandatory_artifacts_resource_ids_linux=None, mandatory_artifacts_resource_ids_windows=None, premium_data_disks=None, environment_permission=None, announcement=None, support=None, extended_properties=None, **kwargs) -> None: + super(Lab, self).__init__(location=location, tags=tags, **kwargs) + self.default_storage_account = None + self.default_premium_storage_account = None + self.artifacts_storage_account = None + self.premium_data_disk_storage_account = None + self.vault_name = None + self.lab_storage_type = lab_storage_type + self.mandatory_artifacts_resource_ids_linux = mandatory_artifacts_resource_ids_linux + self.mandatory_artifacts_resource_ids_windows = mandatory_artifacts_resource_ids_windows + self.created_date = None + self.premium_data_disks = premium_data_disks + self.environment_permission = environment_permission + self.announcement = announcement + self.support = support + self.vm_creation_resource_group = None + self.public_ip_id = None + self.load_balancer_id = None + self.network_security_group_id = None + self.extended_properties = extended_properties + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py index c54896a91cfc..8883745b9735 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties.py @@ -50,14 +50,14 @@ class LabResourceCostProperties(Model): 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, } - def __init__(self, resourcename=None, resource_uid=None, resource_cost=None, resource_type=None, resource_owner=None, resource_pricing_tier=None, resource_status=None, resource_id=None, external_resource_id=None): - super(LabResourceCostProperties, self).__init__() - self.resourcename = resourcename - self.resource_uid = resource_uid - self.resource_cost = resource_cost - self.resource_type = resource_type - self.resource_owner = resource_owner - self.resource_pricing_tier = resource_pricing_tier - self.resource_status = resource_status - self.resource_id = resource_id - self.external_resource_id = external_resource_id + def __init__(self, **kwargs): + super(LabResourceCostProperties, self).__init__(**kwargs) + self.resourcename = kwargs.get('resourcename', None) + self.resource_uid = kwargs.get('resource_uid', None) + self.resource_cost = kwargs.get('resource_cost', None) + self.resource_type = kwargs.get('resource_type', None) + self.resource_owner = kwargs.get('resource_owner', None) + self.resource_pricing_tier = kwargs.get('resource_pricing_tier', None) + self.resource_status = kwargs.get('resource_status', None) + self.resource_id = kwargs.get('resource_id', None) + self.external_resource_id = kwargs.get('external_resource_id', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py new file mode 100644 index 000000000000..5b360dee84b9 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_resource_cost_properties_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabResourceCostProperties(Model): + """The properties of a resource cost item. + + :param resourcename: The name of the resource. + :type resourcename: str + :param resource_uid: The unique identifier of the resource. + :type resource_uid: str + :param resource_cost: The cost component of the resource cost item. + :type resource_cost: float + :param resource_type: The logical resource type (ex. virtualmachine, + storageaccount) + :type resource_type: str + :param resource_owner: The owner of the resource (ex. + janedoe@microsoft.com) + :type resource_owner: str + :param resource_pricing_tier: The category of the resource (ex. + Premium_LRS, Standard_DS1) + :type resource_pricing_tier: str + :param resource_status: The status of the resource (ex. Active) + :type resource_status: str + :param resource_id: The ID of the resource + :type resource_id: str + :param external_resource_id: The ID of the external resource + :type external_resource_id: str + """ + + _attribute_map = { + 'resourcename': {'key': 'resourcename', 'type': 'str'}, + 'resource_uid': {'key': 'resourceUId', 'type': 'str'}, + 'resource_cost': {'key': 'resourceCost', 'type': 'float'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_owner': {'key': 'resourceOwner', 'type': 'str'}, + 'resource_pricing_tier': {'key': 'resourcePricingTier', 'type': 'str'}, + 'resource_status': {'key': 'resourceStatus', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'external_resource_id': {'key': 'externalResourceId', 'type': 'str'}, + } + + def __init__(self, *, resourcename: str=None, resource_uid: str=None, resource_cost: float=None, resource_type: str=None, resource_owner: str=None, resource_pricing_tier: str=None, resource_status: str=None, resource_id: str=None, external_resource_id: str=None, **kwargs) -> None: + super(LabResourceCostProperties, self).__init__(**kwargs) + self.resourcename = resourcename + self.resource_uid = resource_uid + self.resource_cost = resource_cost + self.resource_type = resource_type + self.resource_owner = resource_owner + self.resource_pricing_tier = resource_pricing_tier + self.resource_status = resource_status + self.resource_id = resource_id + self.external_resource_id = external_resource_id diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py new file mode 100644 index 000000000000..e948a530fa44 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabSupportProperties(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabSupportProperties, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.markdown = kwargs.get('markdown', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py new file mode 100644 index 000000000000..53bf876c5a2c --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabSupportPropertiesFragment(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LabSupportPropertiesFragment, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.markdown = kwargs.get('markdown', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py new file mode 100644 index 000000000000..0495bf2657d2 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_fragment_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabSupportPropertiesFragment(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: + super(LabSupportPropertiesFragment, self).__init__(**kwargs) + self.enabled = enabled + self.markdown = markdown diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py new file mode 100644 index 000000000000..0eac2ef2c950 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_support_properties_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabSupportProperties(Model): + """Properties of a lab's support banner. + + :param enabled: Is the lab support banner active/enabled at this time?. + Possible values include: 'Enabled', 'Disabled' + :type enabled: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param markdown: The markdown text (if any) that this lab displays in the + UI. If left empty/null, nothing will be shown. + :type markdown: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + } + + def __init__(self, *, enabled=None, markdown: str=None, **kwargs) -> None: + super(LabSupportProperties, self).__init__(**kwargs) + self.enabled = enabled + self.markdown = markdown diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py index bf47c96ab702..acb777ea8f1b 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd.py @@ -23,6 +23,6 @@ class LabVhd(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, id=None): - super(LabVhd, self).__init__() - self.id = id + def __init__(self, **kwargs): + super(LabVhd, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py new file mode 100644 index 000000000000..7f0adddb42ae --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_vhd_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabVhd(Model): + """Properties of a VHD in the lab. + + :param id: The URI to the VHD. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(LabVhd, self).__init__(**kwargs) + self.id = id diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py index 20c6e8ef4bbf..079a4c3bb59f 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine.py @@ -44,9 +44,9 @@ class LabVirtualMachine(Resource): :type created_by_user: str :param created_date: The creation date of the virtual machine. :type created_date: datetime - :ivar compute_id: The resource identifier (Microsoft.Compute) of the + :param compute_id: The resource identifier (Microsoft.Compute) of the virtual machine. - :vartype compute_id: str + :type compute_id: str :param custom_image_id: The custom image identifier of the virtual machine. :type custom_image_id: str @@ -84,14 +84,17 @@ class LabVirtualMachine(Resource): reference of the virtual machine. :type gallery_image_reference: ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param compute_vm: The compute virtual machine properties. - :type compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :ivar compute_vm: The compute virtual machine properties. + :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties :param network_interface: The network interface properties. :type network_interface: ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :param applicable_schedule: The applicable schedule for the virtual + :ivar applicable_schedule: The applicable schedule for the virtual machine. - :type applicable_schedule: + :vartype applicable_schedule: ~azure.mgmt.devtestlabs.models.ApplicableSchedule :param expiration_date: The expiration date for VM. :type expiration_date: datetime @@ -109,18 +112,31 @@ class LabVirtualMachine(Resource): :param environment_id: The resource ID of the environment that contains this virtual machine, if any. :type environment_id: str - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource (Guid). - :type unique_identifier: str + :vartype unique_identifier: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'compute_id': {'readonly': True}, + 'compute_vm': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, } _attribute_map = { @@ -150,6 +166,7 @@ class LabVirtualMachine(Resource): 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, @@ -158,40 +175,47 @@ class LabVirtualMachine(Resource): 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, notes=None, owner_object_id=None, owner_user_principal_name=None, created_by_user_id=None, created_by_user=None, created_date=None, custom_image_id=None, os_type=None, size=None, user_name=None, password=None, ssh_key=None, is_authentication_with_ssh_key=None, fqdn=None, lab_subnet_name=None, lab_virtual_network_id=None, disallow_public_ip_address=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, compute_vm=None, network_interface=None, applicable_schedule=None, expiration_date=None, allow_claim=None, storage_type=None, virtual_machine_creation_source=None, environment_id=None, provisioning_state=None, unique_identifier=None): - super(LabVirtualMachine, self).__init__(location=location, tags=tags) - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.compute_id = None - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.compute_vm = compute_vm - self.network_interface = network_interface - self.applicable_schedule = applicable_schedule - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + def __init__(self, **kwargs): + super(LabVirtualMachine, self).__init__(**kwargs) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.compute_vm = None + self.network_interface = kwargs.get('network_interface', None) + self.applicable_schedule = None + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py index 16806d1b2ee9..db9aad603356 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter.py @@ -35,6 +35,9 @@ class LabVirtualMachineCreationParameter(Model): :type created_by_user: str :param created_date: The creation date of the virtual machine. :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str :param custom_image_id: The custom image identifier of the virtual machine. :type custom_image_id: str @@ -72,15 +75,12 @@ class LabVirtualMachineCreationParameter(Model): reference of the virtual machine. :type gallery_image_reference: ~azure.mgmt.devtestlabs.models.GalleryImageReference - :param compute_vm: The compute virtual machine properties. - :type compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str :param network_interface: The network interface properties. :type network_interface: ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties - :param applicable_schedule: The applicable schedule for the virtual - machine. - :type applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableSchedule :param expiration_date: The expiration date for VM. :type expiration_date: datetime :param allow_claim: Indicates whether another user can take ownership of @@ -97,11 +97,16 @@ class LabVirtualMachineCreationParameter(Model): :param environment_id: The resource ID of the environment that contains this virtual machine, if any. :type environment_id: str - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource - (Guid). - :type unique_identifier: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str :param name: The name of the virtual machine or environment :type name: str :param location: The location of the new virtual machine or environment @@ -118,6 +123,7 @@ class LabVirtualMachineCreationParameter(Model): 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, 'os_type': {'key': 'properties.osType', 'type': 'str'}, 'size': {'key': 'properties.size', 'type': 'str'}, @@ -132,54 +138,55 @@ class LabVirtualMachineCreationParameter(Model): 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, - 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, bulk_creation_parameters=None, notes=None, owner_object_id=None, owner_user_principal_name=None, created_by_user_id=None, created_by_user=None, created_date=None, custom_image_id=None, os_type=None, size=None, user_name=None, password=None, ssh_key=None, is_authentication_with_ssh_key=None, fqdn=None, lab_subnet_name=None, lab_virtual_network_id=None, disallow_public_ip_address=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, compute_vm=None, network_interface=None, applicable_schedule=None, expiration_date=None, allow_claim=None, storage_type=None, virtual_machine_creation_source=None, environment_id=None, provisioning_state=None, unique_identifier=None, name=None, location=None, tags=None): - super(LabVirtualMachineCreationParameter, self).__init__() - self.bulk_creation_parameters = bulk_creation_parameters - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.compute_vm = compute_vm - self.network_interface = network_interface - self.applicable_schedule = applicable_schedule - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier - self.name = name - self.location = location - self.tags = tags + def __init__(self, **kwargs): + super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) + self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py new file mode 100644 index 000000000000..2a58002ea2bf --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.py @@ -0,0 +1,192 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabVirtualMachineCreationParameterFragment(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) + self.bulk_creation_parameters = kwargs.get('bulk_creation_parameters', None) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py new file mode 100644 index 000000000000..d583a499210f --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_fragment_py3.py @@ -0,0 +1,192 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabVirtualMachineCreationParameterFragment(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParametersFragment + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParametersFragment'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(LabVirtualMachineCreationParameterFragment, self).__init__(**kwargs) + self.bulk_creation_parameters = bulk_creation_parameters + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.name = name + self.location = location + self.tags = tags diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py new file mode 100644 index 000000000000..f6df337a6179 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_creation_parameter_py3.py @@ -0,0 +1,192 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LabVirtualMachineCreationParameter(Model): + """Properties for creating a virtual machine. + + :param bulk_creation_parameters: The number of virtual machine instances + to create. + :type bulk_creation_parameters: + ~azure.mgmt.devtestlabs.models.BulkCreationParameters + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'bulk_creation_parameters': {'key': 'properties.bulkCreationParameters', 'type': 'BulkCreationParameters'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, bulk_creation_parameters=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(LabVirtualMachineCreationParameter, self).__init__(**kwargs) + self.bulk_creation_parameters = bulk_creation_parameters + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.name = name + self.location = location + self.tags = tags diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py index 11370439a3d9..132affe5f1ba 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment.py @@ -9,23 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .update_resource import UpdateResource -class LabVirtualMachineFragment(Resource): +class LabVirtualMachineFragment(UpdateResource): """A virtual machine. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str :param tags: The tags of the resource. :type tags: dict[str, str] :param notes: The notes of the virtual machine. @@ -44,6 +33,9 @@ class LabVirtualMachineFragment(Resource): :type created_by_user: str :param created_date: The creation date of the virtual machine. :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str :param custom_image_id: The custom image identifier of the virtual machine. :type custom_image_id: str @@ -81,16 +73,12 @@ class LabVirtualMachineFragment(Resource): reference of the virtual machine. :type gallery_image_reference: ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment - :param compute_vm: The compute virtual machine properties. - :type compute_vm: - ~azure.mgmt.devtestlabs.models.ComputeVmPropertiesFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str :param network_interface: The network interface properties. :type network_interface: ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment - :param applicable_schedule: The applicable schedule for the virtual - machine. - :type applicable_schedule: - ~azure.mgmt.devtestlabs.models.ApplicableScheduleFragment :param expiration_date: The expiration date for VM. :type expiration_date: datetime :param allow_claim: Indicates whether another user can take ownership of @@ -107,24 +95,19 @@ class LabVirtualMachineFragment(Resource): :param environment_id: The resource ID of the environment that contains this virtual machine, if any. :type environment_id: str - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource - (Guid). - :type unique_identifier: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'notes': {'key': 'properties.notes', 'type': 'str'}, 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, @@ -132,6 +115,7 @@ class LabVirtualMachineFragment(Resource): 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, 'os_type': {'key': 'properties.osType', 'type': 'str'}, 'size': {'key': 'properties.size', 'type': 'str'}, @@ -146,47 +130,48 @@ class LabVirtualMachineFragment(Resource): 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, - 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmPropertiesFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, - 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableScheduleFragment'}, 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, } - def __init__(self, location=None, tags=None, notes=None, owner_object_id=None, owner_user_principal_name=None, created_by_user_id=None, created_by_user=None, created_date=None, custom_image_id=None, os_type=None, size=None, user_name=None, password=None, ssh_key=None, is_authentication_with_ssh_key=None, fqdn=None, lab_subnet_name=None, lab_virtual_network_id=None, disallow_public_ip_address=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, compute_vm=None, network_interface=None, applicable_schedule=None, expiration_date=None, allow_claim=None, storage_type=None, virtual_machine_creation_source=None, environment_id=None, provisioning_state=None, unique_identifier=None): - super(LabVirtualMachineFragment, self).__init__(location=location, tags=tags) - self.notes = notes - self.owner_object_id = owner_object_id - self.owner_user_principal_name = owner_user_principal_name - self.created_by_user_id = created_by_user_id - self.created_by_user = created_by_user - self.created_date = created_date - self.custom_image_id = custom_image_id - self.os_type = os_type - self.size = size - self.user_name = user_name - self.password = password - self.ssh_key = ssh_key - self.is_authentication_with_ssh_key = is_authentication_with_ssh_key - self.fqdn = fqdn - self.lab_subnet_name = lab_subnet_name - self.lab_virtual_network_id = lab_virtual_network_id - self.disallow_public_ip_address = disallow_public_ip_address - self.artifacts = artifacts - self.artifact_deployment_status = artifact_deployment_status - self.gallery_image_reference = gallery_image_reference - self.compute_vm = compute_vm - self.network_interface = network_interface - self.applicable_schedule = applicable_schedule - self.expiration_date = expiration_date - self.allow_claim = allow_claim - self.storage_type = storage_type - self.virtual_machine_creation_source = virtual_machine_creation_source - self.environment_id = environment_id - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + def __init__(self, **kwargs): + super(LabVirtualMachineFragment, self).__init__(**kwargs) + self.notes = kwargs.get('notes', None) + self.owner_object_id = kwargs.get('owner_object_id', None) + self.owner_user_principal_name = kwargs.get('owner_user_principal_name', None) + self.created_by_user_id = kwargs.get('created_by_user_id', None) + self.created_by_user = kwargs.get('created_by_user', None) + self.created_date = kwargs.get('created_date', None) + self.compute_id = kwargs.get('compute_id', None) + self.custom_image_id = kwargs.get('custom_image_id', None) + self.os_type = kwargs.get('os_type', None) + self.size = kwargs.get('size', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.ssh_key = kwargs.get('ssh_key', None) + self.is_authentication_with_ssh_key = kwargs.get('is_authentication_with_ssh_key', None) + self.fqdn = kwargs.get('fqdn', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.lab_virtual_network_id = kwargs.get('lab_virtual_network_id', None) + self.disallow_public_ip_address = kwargs.get('disallow_public_ip_address', None) + self.artifacts = kwargs.get('artifacts', None) + self.artifact_deployment_status = kwargs.get('artifact_deployment_status', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.plan_id = kwargs.get('plan_id', None) + self.network_interface = kwargs.get('network_interface', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.allow_claim = kwargs.get('allow_claim', None) + self.storage_type = kwargs.get('storage_type', None) + self.virtual_machine_creation_source = kwargs.get('virtual_machine_creation_source', None) + self.environment_id = kwargs.get('environment_id', None) + self.data_disk_parameters = kwargs.get('data_disk_parameters', None) + self.schedule_parameters = kwargs.get('schedule_parameters', None) + self.last_known_power_state = kwargs.get('last_known_power_state', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py new file mode 100644 index 000000000000..11dca443d47b --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_fragment_py3.py @@ -0,0 +1,177 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource_py3 import UpdateResource + + +class LabVirtualMachineFragment(UpdateResource): + """A virtual machine. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallPropertiesFragment] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusPropertiesFragment + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReferenceFragment + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfacePropertiesFragment + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskPropertiesFragment] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameterFragment] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallPropertiesFragment]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusPropertiesFragment'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReferenceFragment'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfacePropertiesFragment'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskPropertiesFragment]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameterFragment]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + } + + def __init__(self, *, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: + super(LabVirtualMachineFragment, self).__init__(tags=tags, **kwargs) + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.network_interface = network_interface + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py new file mode 100644 index 000000000000..354acb458cc9 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/lab_virtual_machine_py3.py @@ -0,0 +1,221 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class LabVirtualMachine(Resource): + """A virtual machine. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param notes: The notes of the virtual machine. + :type notes: str + :param owner_object_id: The object identifier of the owner of the virtual + machine. + :type owner_object_id: str + :param owner_user_principal_name: The user principal name of the virtual + machine owner. + :type owner_user_principal_name: str + :param created_by_user_id: The object identifier of the creator of the + virtual machine. + :type created_by_user_id: str + :param created_by_user: The email address of creator of the virtual + machine. + :type created_by_user: str + :param created_date: The creation date of the virtual machine. + :type created_date: datetime + :param compute_id: The resource identifier (Microsoft.Compute) of the + virtual machine. + :type compute_id: str + :param custom_image_id: The custom image identifier of the virtual + machine. + :type custom_image_id: str + :param os_type: The OS type of the virtual machine. + :type os_type: str + :param size: The size of the virtual machine. + :type size: str + :param user_name: The user name of the virtual machine. + :type user_name: str + :param password: The password of the virtual machine administrator. + :type password: str + :param ssh_key: The SSH key of the virtual machine administrator. + :type ssh_key: str + :param is_authentication_with_ssh_key: Indicates whether this virtual + machine uses an SSH key for authentication. + :type is_authentication_with_ssh_key: bool + :param fqdn: The fully-qualified domain name of the virtual machine. + :type fqdn: str + :param lab_subnet_name: The lab subnet name of the virtual machine. + :type lab_subnet_name: str + :param lab_virtual_network_id: The lab virtual network identifier of the + virtual machine. + :type lab_virtual_network_id: str + :param disallow_public_ip_address: Indicates whether the virtual machine + is to be created without a public IP address. + :type disallow_public_ip_address: bool + :param artifacts: The artifacts to be installed on the virtual machine. + :type artifacts: + list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] + :param artifact_deployment_status: The artifact deployment status for the + virtual machine. + :type artifact_deployment_status: + ~azure.mgmt.devtestlabs.models.ArtifactDeploymentStatusProperties + :param gallery_image_reference: The Microsoft Azure Marketplace image + reference of the virtual machine. + :type gallery_image_reference: + ~azure.mgmt.devtestlabs.models.GalleryImageReference + :param plan_id: The id of the plan associated with the virtual machine + image + :type plan_id: str + :ivar compute_vm: The compute virtual machine properties. + :vartype compute_vm: ~azure.mgmt.devtestlabs.models.ComputeVmProperties + :param network_interface: The network interface properties. + :type network_interface: + ~azure.mgmt.devtestlabs.models.NetworkInterfaceProperties + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :param expiration_date: The expiration date for VM. + :type expiration_date: datetime + :param allow_claim: Indicates whether another user can take ownership of + the virtual machine + :type allow_claim: bool + :param storage_type: Storage type to use for virtual machine (i.e. + Standard, Premium). + :type storage_type: str + :param virtual_machine_creation_source: Tells source of creation of lab + virtual machine. Output property only. Possible values include: + 'FromCustomImage', 'FromGalleryImage' + :type virtual_machine_creation_source: str or + ~azure.mgmt.devtestlabs.models.VirtualMachineCreationSource + :param environment_id: The resource ID of the environment that contains + this virtual machine, if any. + :type environment_id: str + :param data_disk_parameters: New or existing data disks to attach to the + virtual machine after creation + :type data_disk_parameters: + list[~azure.mgmt.devtestlabs.models.DataDiskProperties] + :param schedule_parameters: Virtual Machine schedules to be created + :type schedule_parameters: + list[~azure.mgmt.devtestlabs.models.ScheduleCreationParameter] + :param last_known_power_state: Last known compute power state captured in + DTL + :type last_known_power_state: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'compute_vm': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'owner_object_id': {'key': 'properties.ownerObjectId', 'type': 'str'}, + 'owner_user_principal_name': {'key': 'properties.ownerUserPrincipalName', 'type': 'str'}, + 'created_by_user_id': {'key': 'properties.createdByUserId', 'type': 'str'}, + 'created_by_user': {'key': 'properties.createdByUser', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'compute_id': {'key': 'properties.computeId', 'type': 'str'}, + 'custom_image_id': {'key': 'properties.customImageId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'size': {'key': 'properties.size', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'ssh_key': {'key': 'properties.sshKey', 'type': 'str'}, + 'is_authentication_with_ssh_key': {'key': 'properties.isAuthenticationWithSshKey', 'type': 'bool'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'lab_subnet_name': {'key': 'properties.labSubnetName', 'type': 'str'}, + 'lab_virtual_network_id': {'key': 'properties.labVirtualNetworkId', 'type': 'str'}, + 'disallow_public_ip_address': {'key': 'properties.disallowPublicIpAddress', 'type': 'bool'}, + 'artifacts': {'key': 'properties.artifacts', 'type': '[ArtifactInstallProperties]'}, + 'artifact_deployment_status': {'key': 'properties.artifactDeploymentStatus', 'type': 'ArtifactDeploymentStatusProperties'}, + 'gallery_image_reference': {'key': 'properties.galleryImageReference', 'type': 'GalleryImageReference'}, + 'plan_id': {'key': 'properties.planId', 'type': 'str'}, + 'compute_vm': {'key': 'properties.computeVm', 'type': 'ComputeVmProperties'}, + 'network_interface': {'key': 'properties.networkInterface', 'type': 'NetworkInterfaceProperties'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'allow_claim': {'key': 'properties.allowClaim', 'type': 'bool'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'virtual_machine_creation_source': {'key': 'properties.virtualMachineCreationSource', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'data_disk_parameters': {'key': 'properties.dataDiskParameters', 'type': '[DataDiskProperties]'}, + 'schedule_parameters': {'key': 'properties.scheduleParameters', 'type': '[ScheduleCreationParameter]'}, + 'last_known_power_state': {'key': 'properties.lastKnownPowerState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, notes: str=None, owner_object_id: str=None, owner_user_principal_name: str=None, created_by_user_id: str=None, created_by_user: str=None, created_date=None, compute_id: str=None, custom_image_id: str=None, os_type: str=None, size: str=None, user_name: str=None, password: str=None, ssh_key: str=None, is_authentication_with_ssh_key: bool=None, fqdn: str=None, lab_subnet_name: str=None, lab_virtual_network_id: str=None, disallow_public_ip_address: bool=None, artifacts=None, artifact_deployment_status=None, gallery_image_reference=None, plan_id: str=None, network_interface=None, expiration_date=None, allow_claim: bool=None, storage_type: str=None, virtual_machine_creation_source=None, environment_id: str=None, data_disk_parameters=None, schedule_parameters=None, last_known_power_state: str=None, **kwargs) -> None: + super(LabVirtualMachine, self).__init__(location=location, tags=tags, **kwargs) + self.notes = notes + self.owner_object_id = owner_object_id + self.owner_user_principal_name = owner_user_principal_name + self.created_by_user_id = created_by_user_id + self.created_by_user = created_by_user + self.created_date = created_date + self.compute_id = compute_id + self.custom_image_id = custom_image_id + self.os_type = os_type + self.size = size + self.user_name = user_name + self.password = password + self.ssh_key = ssh_key + self.is_authentication_with_ssh_key = is_authentication_with_ssh_key + self.fqdn = fqdn + self.lab_subnet_name = lab_subnet_name + self.lab_virtual_network_id = lab_virtual_network_id + self.disallow_public_ip_address = disallow_public_ip_address + self.artifacts = artifacts + self.artifact_deployment_status = artifact_deployment_status + self.gallery_image_reference = gallery_image_reference + self.plan_id = plan_id + self.compute_vm = None + self.network_interface = network_interface + self.applicable_schedule = None + self.expiration_date = expiration_date + self.allow_claim = allow_claim + self.storage_type = storage_type + self.virtual_machine_creation_source = virtual_machine_creation_source + self.environment_id = environment_id + self.data_disk_parameters = data_disk_parameters + self.schedule_parameters = schedule_parameters + self.last_known_power_state = last_known_power_state + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py index e583d3045f34..70154219e989 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info.py @@ -25,6 +25,6 @@ class LinuxOsInfo(Model): 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, } - def __init__(self, linux_os_state=None): - super(LinuxOsInfo, self).__init__() - self.linux_os_state = linux_os_state + def __init__(self, **kwargs): + super(LinuxOsInfo, self).__init__(**kwargs) + self.linux_os_state = kwargs.get('linux_os_state', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py new file mode 100644 index 000000000000..a7b98b278ea7 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LinuxOsInfoFragment(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LinuxOsInfoFragment, self).__init__(**kwargs) + self.linux_os_state = kwargs.get('linux_os_state', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py new file mode 100644 index 000000000000..b8b4919c8eab --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_fragment_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LinuxOsInfoFragment(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, *, linux_os_state=None, **kwargs) -> None: + super(LinuxOsInfoFragment, self).__init__(**kwargs) + self.linux_os_state = linux_os_state diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py new file mode 100644 index 000000000000..a8176b7be240 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/linux_os_info_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LinuxOsInfo(Model): + """Information about a Linux OS. + + :param linux_os_state: The state of the Linux OS (i.e. NonDeprovisioned, + DeprovisionRequested, DeprovisionApplied). Possible values include: + 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied' + :type linux_os_state: str or ~azure.mgmt.devtestlabs.models.LinuxOsState + """ + + _attribute_map = { + 'linux_os_state': {'key': 'linuxOsState', 'type': 'str'}, + } + + def __init__(self, *, linux_os_state=None, **kwargs) -> None: + super(LinuxOsInfo, self).__init__(**kwargs) + self.linux_os_state = linux_os_state diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py index 7dd0fa9969da..67bd4ee0a9fc 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties.py @@ -52,14 +52,14 @@ class NetworkInterfaceProperties(Model): 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, } - def __init__(self, virtual_network_id=None, subnet_id=None, public_ip_address_id=None, public_ip_address=None, private_ip_address=None, dns_name=None, rdp_authority=None, ssh_authority=None, shared_public_ip_address_configuration=None): - super(NetworkInterfaceProperties, self).__init__() - self.virtual_network_id = virtual_network_id - self.subnet_id = subnet_id - self.public_ip_address_id = public_ip_address_id - self.public_ip_address = public_ip_address - self.private_ip_address = private_ip_address - self.dns_name = dns_name - self.rdp_authority = rdp_authority - self.ssh_authority = ssh_authority - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + def __init__(self, **kwargs): + super(NetworkInterfaceProperties, self).__init__(**kwargs) + self.virtual_network_id = kwargs.get('virtual_network_id', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.public_ip_address_id = kwargs.get('public_ip_address_id', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + self.dns_name = kwargs.get('dns_name', None) + self.rdp_authority = kwargs.get('rdp_authority', None) + self.ssh_authority = kwargs.get('ssh_authority', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py index 75649c4a5084..e42965548e38 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment.py @@ -52,14 +52,14 @@ class NetworkInterfacePropertiesFragment(Model): 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, } - def __init__(self, virtual_network_id=None, subnet_id=None, public_ip_address_id=None, public_ip_address=None, private_ip_address=None, dns_name=None, rdp_authority=None, ssh_authority=None, shared_public_ip_address_configuration=None): - super(NetworkInterfacePropertiesFragment, self).__init__() - self.virtual_network_id = virtual_network_id - self.subnet_id = subnet_id - self.public_ip_address_id = public_ip_address_id - self.public_ip_address = public_ip_address - self.private_ip_address = private_ip_address - self.dns_name = dns_name - self.rdp_authority = rdp_authority - self.ssh_authority = ssh_authority - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + def __init__(self, **kwargs): + super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) + self.virtual_network_id = kwargs.get('virtual_network_id', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.public_ip_address_id = kwargs.get('public_ip_address_id', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + self.dns_name = kwargs.get('dns_name', None) + self.rdp_authority = kwargs.get('rdp_authority', None) + self.ssh_authority = kwargs.get('ssh_authority', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py new file mode 100644 index 000000000000..87854401d799 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_fragment_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkInterfacePropertiesFragment(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfigurationFragment + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfigurationFragment'}, + } + + def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: + super(NetworkInterfacePropertiesFragment, self).__init__(**kwargs) + self.virtual_network_id = virtual_network_id + self.subnet_id = subnet_id + self.public_ip_address_id = public_ip_address_id + self.public_ip_address = public_ip_address + self.private_ip_address = private_ip_address + self.dns_name = dns_name + self.rdp_authority = rdp_authority + self.ssh_authority = ssh_authority + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py new file mode 100644 index 000000000000..c68daf4e897b --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/network_interface_properties_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkInterfaceProperties(Model): + """Properties of a network interface. + + :param virtual_network_id: The resource ID of the virtual network. + :type virtual_network_id: str + :param subnet_id: The resource ID of the sub net. + :type subnet_id: str + :param public_ip_address_id: The resource ID of the public IP address. + :type public_ip_address_id: str + :param public_ip_address: The public IP address. + :type public_ip_address: str + :param private_ip_address: The private IP address. + :type private_ip_address: str + :param dns_name: The DNS name. + :type dns_name: str + :param rdp_authority: The RdpAuthority property is a server DNS host name + or IP address followed by the service port number for RDP (Remote Desktop + Protocol). + :type rdp_authority: str + :param ssh_authority: The SshAuthority property is a server DNS host name + or IP address followed by the service port number for SSH. + :type ssh_authority: str + :param shared_public_ip_address_configuration: The configuration for + sharing a public IP address across multiple virtual machines. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SharedPublicIpAddressConfiguration + """ + + _attribute_map = { + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + 'rdp_authority': {'key': 'rdpAuthority', 'type': 'str'}, + 'ssh_authority': {'key': 'sshAuthority', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SharedPublicIpAddressConfiguration'}, + } + + def __init__(self, *, virtual_network_id: str=None, subnet_id: str=None, public_ip_address_id: str=None, public_ip_address: str=None, private_ip_address: str=None, dns_name: str=None, rdp_authority: str=None, ssh_authority: str=None, shared_public_ip_address_configuration=None, **kwargs) -> None: + super(NetworkInterfaceProperties, self).__init__(**kwargs) + self.virtual_network_id = virtual_network_id + self.subnet_id = subnet_id + self.public_ip_address_id = public_ip_address_id + self.public_ip_address = public_ip_address + self.private_ip_address = private_ip_address + self.dns_name = dns_name + self.rdp_authority = rdp_authority + self.ssh_authority = ssh_authority + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py index a30755d81a80..9f93dcb6a891 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py @@ -30,17 +30,23 @@ class NotificationChannel(Resource): :type tags: dict[str, str] :param web_hook_url: The webhook URL to send notifications to. :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon seperated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str :param description: Description of notification. :type description: str :param events: The list of event for which this notification is enabled. :type events: list[~azure.mgmt.devtestlabs.models.Event] :ivar created_date: The creation date of the notification channel. :vartype created_date: datetime - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource (Guid). - :type unique_identifier: str + :vartype unique_identifier: str """ _validation = { @@ -48,6 +54,8 @@ class NotificationChannel(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, } _attribute_map = { @@ -57,6 +65,8 @@ class NotificationChannel(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'events': {'key': 'properties.events', 'type': '[Event]'}, 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, @@ -64,11 +74,13 @@ class NotificationChannel(Resource): 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, web_hook_url=None, description=None, events=None, provisioning_state=None, unique_identifier=None): - super(NotificationChannel, self).__init__(location=location, tags=tags) - self.web_hook_url = web_hook_url - self.description = description - self.events = events + def __init__(self, **kwargs): + super(NotificationChannel, self).__init__(**kwargs) + self.web_hook_url = kwargs.get('web_hook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + self.description = kwargs.get('description', None) + self.events = kwargs.get('events', None) self.created_date = None - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py index 4fb2266cc468..6a8748381026 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py @@ -9,61 +9,41 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .update_resource import UpdateResource -class NotificationChannelFragment(Resource): +class NotificationChannelFragment(UpdateResource): """A notification. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str :param tags: The tags of the resource. :type tags: dict[str, str] :param web_hook_url: The webhook URL to send notifications to. :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon seperated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str :param description: Description of notification. :type description: str :param events: The list of event for which this notification is enabled. :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource - (Guid). - :type unique_identifier: str """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, web_hook_url=None, description=None, events=None, provisioning_state=None, unique_identifier=None): - super(NotificationChannelFragment, self).__init__(location=location, tags=tags) - self.web_hook_url = web_hook_url - self.description = description - self.events = events - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + def __init__(self, **kwargs): + super(NotificationChannelFragment, self).__init__(**kwargs) + self.web_hook_url = kwargs.get('web_hook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) + self.description = kwargs.get('description', None) + self.events = kwargs.get('events', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py new file mode 100644 index 000000000000..52e186582cca --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource_py3 import UpdateResource + + +class NotificationChannelFragment(UpdateResource): + """A notification. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon seperated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.EventFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[EventFragment]'}, + } + + def __init__(self, *, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: + super(NotificationChannelFragment, self).__init__(tags=tags, **kwargs) + self.web_hook_url = web_hook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + self.description = description + self.events = events diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py new file mode 100644 index 000000000000..081d126af337 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py @@ -0,0 +1,86 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class NotificationChannel(Resource): + """A notification. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param web_hook_url: The webhook URL to send notifications to. + :type web_hook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon seperated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + :param description: Description of notification. + :type description: str + :param events: The list of event for which this notification is enabled. + :type events: list[~azure.mgmt.devtestlabs.models.Event] + :ivar created_date: The creation date of the notification channel. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'web_hook_url': {'key': 'properties.webHookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'properties.emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'properties.notificationLocale', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'events': {'key': 'properties.events', 'type': '[Event]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, web_hook_url: str=None, email_recipient: str=None, notification_locale: str=None, description: str=None, events=None, **kwargs) -> None: + super(NotificationChannel, self).__init__(location=location, tags=tags, **kwargs) + self.web_hook_url = web_hook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale + self.description = description + self.events = events + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py index 4cc6ed9cf625..979023e5c506 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py @@ -16,24 +16,34 @@ class NotificationSettings(Model): """Notification settings for a schedule. :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Disabled', 'Enabled' - :type status: str or ~azure.mgmt.devtestlabs.models.NotificationStatus + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus :param time_in_minutes: Time in minutes before event at which notification will be sent. :type time_in_minutes: int :param webhook_url: The webhook URL to which the notification will be sent. :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon seperated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str """ _attribute_map = { 'status': {'key': 'status', 'type': 'str'}, 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, } - def __init__(self, status=None, time_in_minutes=None, webhook_url=None): - super(NotificationSettings, self).__init__() - self.status = status - self.time_in_minutes = time_in_minutes - self.webhook_url = webhook_url + def __init__(self, **kwargs): + super(NotificationSettings, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.time_in_minutes = kwargs.get('time_in_minutes', None) + self.webhook_url = kwargs.get('webhook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py index 07b9d09e8561..cee1c980e4c5 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py @@ -16,24 +16,34 @@ class NotificationSettingsFragment(Model): """Notification settings for a schedule. :param status: If notifications are enabled for this schedule (i.e. - Enabled, Disabled). Possible values include: 'Disabled', 'Enabled' - :type status: str or ~azure.mgmt.devtestlabs.models.NotificationStatus + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus :param time_in_minutes: Time in minutes before event at which notification will be sent. :type time_in_minutes: int :param webhook_url: The webhook URL to which the notification will be sent. :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon seperated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str """ _attribute_map = { 'status': {'key': 'status', 'type': 'str'}, 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, } - def __init__(self, status=None, time_in_minutes=None, webhook_url=None): - super(NotificationSettingsFragment, self).__init__() - self.status = status - self.time_in_minutes = time_in_minutes - self.webhook_url = webhook_url + def __init__(self, **kwargs): + super(NotificationSettingsFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.time_in_minutes = kwargs.get('time_in_minutes', None) + self.webhook_url = kwargs.get('webhook_url', None) + self.email_recipient = kwargs.get('email_recipient', None) + self.notification_locale = kwargs.get('notification_locale', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py new file mode 100644 index 000000000000..e7b7c6be8171 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NotificationSettingsFragment(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon seperated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: + super(NotificationSettingsFragment, self).__init__(**kwargs) + self.status = status + self.time_in_minutes = time_in_minutes + self.webhook_url = webhook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py new file mode 100644 index 000000000000..d4c3d6e90dda --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NotificationSettings(Model): + """Notification settings for a schedule. + + :param status: If notifications are enabled for this schedule (i.e. + Enabled, Disabled). Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param time_in_minutes: Time in minutes before event at which notification + will be sent. + :type time_in_minutes: int + :param webhook_url: The webhook URL to which the notification will be + sent. + :type webhook_url: str + :param email_recipient: The email recipient to send notifications to (can + be a list of semi-colon seperated email addresses). + :type email_recipient: str + :param notification_locale: The locale to use when sending a notification + (fallback for unsupported languages is EN). + :type notification_locale: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, + 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, + 'email_recipient': {'key': 'emailRecipient', 'type': 'str'}, + 'notification_locale': {'key': 'notificationLocale', 'type': 'str'}, + } + + def __init__(self, *, status=None, time_in_minutes: int=None, webhook_url: str=None, email_recipient: str=None, notification_locale: str=None, **kwargs) -> None: + super(NotificationSettings, self).__init__(**kwargs) + self.status = status + self.time_in_minutes = time_in_minutes + self.webhook_url = webhook_url + self.email_recipient = email_recipient + self.notification_locale = notification_locale diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py index db754e5fc335..8adc994f1e40 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters.py @@ -28,7 +28,7 @@ class NotifyParameters(Model): 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, } - def __init__(self, event_name=None, json_payload=None): - super(NotifyParameters, self).__init__() - self.event_name = event_name - self.json_payload = json_payload + def __init__(self, **kwargs): + super(NotifyParameters, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + self.json_payload = kwargs.get('json_payload', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py new file mode 100644 index 000000000000..40b8e900f189 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notify_parameters_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NotifyParameters(Model): + """Properties for generating a Notification. + + :param event_name: The type of event (i.e. AutoShutdown, Cost). Possible + values include: 'AutoShutdown', 'Cost' + :type event_name: str or + ~azure.mgmt.devtestlabs.models.NotificationChannelEventType + :param json_payload: Properties for the notification in json format. + :type json_payload: str + """ + + _attribute_map = { + 'event_name': {'key': 'eventName', 'type': 'str'}, + 'json_payload': {'key': 'jsonPayload', 'type': 'str'}, + } + + def __init__(self, *, event_name=None, json_payload: str=None, **kwargs) -> None: + super(NotifyParameters, self).__init__(**kwargs) + self.event_name = event_name + self.json_payload = json_payload diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py index c5bd4987b1f3..5ee1f80b2712 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error.py @@ -26,7 +26,7 @@ class OperationError(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, code=None, message=None): - super(OperationError, self).__init__() - self.code = code - self.message = message + def __init__(self, **kwargs): + super(OperationError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py new file mode 100644 index 000000000000..19c57b944297 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_error_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationError(Model): + """Error details for the operation in case of a failure. + + :param code: The error code of the operation error. + :type code: str + :param message: The error message of the operation error. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(OperationError, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py index 19b340aa042c..3551895bd8c6 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata.py @@ -26,7 +26,7 @@ class OperationMetadata(Model): 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, } - def __init__(self, name=None, display=None): - super(OperationMetadata, self).__init__() - self.name = name - self.display = display + def __init__(self, **kwargs): + super(OperationMetadata, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py index 9b95af171ef9..c20b0b519d3e 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display.py @@ -33,9 +33,9 @@ class OperationMetadataDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, resource=None, operation=None, description=None): - super(OperationMetadataDisplay, self).__init__() - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description + def __init__(self, **kwargs): + super(OperationMetadataDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py new file mode 100644 index 000000000000..a566cc55bfe8 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_display_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationMetadataDisplay(Model): + """The object that describes the operations. + + :param provider: Friendly name of the resource provider + :type provider: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param operation: Operation type: read, write, delete, listKeys/action, + etc. + :type operation: str + :param description: Friendly name of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationMetadataDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py new file mode 100644 index 000000000000..c1f8e2997f51 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_metadata_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationMetadata(Model): + """The REST API operation supported by DevTestLab ResourceProvider. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operations + :type display: ~azure.mgmt.devtestlabs.models.OperationMetadataDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationMetadataDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(OperationMetadata, self).__init__(**kwargs) + self.name = name + self.display = display diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py index 622c927a6d90..90f43aa80f9f 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result.py @@ -41,8 +41,8 @@ class OperationResult(Model): 'error': {'key': 'error', 'type': 'OperationError'}, } - def __init__(self, status=None, status_code=None, error=None): - super(OperationResult, self).__init__() - self.status = status - self.status_code = status_code - self.error = error + def __init__(self, **kwargs): + super(OperationResult, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.status_code = kwargs.get('status_code', None) + self.error = kwargs.get('error', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py new file mode 100644 index 000000000000..cb371c521fb0 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/operation_result_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationResult(Model): + """An Operation Result. + + :param status: The operation status. + :type status: str + :param status_code: The status code for the operation. Possible values + include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect', + 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', + 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', + 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', + 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', + 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', + 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', + 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + 'HttpVersionNotSupported' + :type status_code: str or ~azure.mgmt.devtestlabs.models.HttpStatusCode + :param error: Error details for the operation in case of a failure. + :type error: ~azure.mgmt.devtestlabs.models.OperationError + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'OperationError'}, + } + + def __init__(self, *, status: str=None, status_code=None, error=None, **kwargs) -> None: + super(OperationResult, self).__init__(**kwargs) + self.status = status + self.status_code = status_code + self.error = error diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py index af444837771a..6e1972e6eace 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info.py @@ -26,7 +26,7 @@ class ParameterInfo(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name=None, value=None): - super(ParameterInfo, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(ParameterInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py new file mode 100644 index 000000000000..f35b39ef3fe4 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameter_info_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ParameterInfo(Model): + """Information about an artifact's parameter. + + :param name: The name of the artifact parameter. + :type name: str + :param value: The value of the artifact parameter. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(ParameterInfo, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py index 6dbaba2b5d0f..a671306eac1c 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info.py @@ -26,7 +26,7 @@ class ParametersValueFileInfo(Model): 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, } - def __init__(self, file_name=None, parameters_value_info=None): - super(ParametersValueFileInfo, self).__init__() - self.file_name = file_name - self.parameters_value_info = parameters_value_info + def __init__(self, **kwargs): + super(ParametersValueFileInfo, self).__init__(**kwargs) + self.file_name = kwargs.get('file_name', None) + self.parameters_value_info = kwargs.get('parameters_value_info', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py new file mode 100644 index 000000000000..fcbc00df3f23 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/parameters_value_file_info_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ParametersValueFileInfo(Model): + """A file containing a set of parameter values for an ARM template. + + :param file_name: File name. + :type file_name: str + :param parameters_value_info: Contents of the file. + :type parameters_value_info: object + """ + + _attribute_map = { + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'parameters_value_info': {'key': 'parametersValueInfo', 'type': 'object'}, + } + + def __init__(self, *, file_name: str=None, parameters_value_info=None, **kwargs) -> None: + super(ParametersValueFileInfo, self).__init__(**kwargs) + self.file_name = file_name + self.parameters_value_info = parameters_value_info diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py index 5e4d269fce19..73de17d9ee24 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties.py @@ -23,6 +23,6 @@ class PercentageCostThresholdProperties(Model): 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, } - def __init__(self, threshold_value=None): - super(PercentageCostThresholdProperties, self).__init__() - self.threshold_value = threshold_value + def __init__(self, **kwargs): + super(PercentageCostThresholdProperties, self).__init__(**kwargs) + self.threshold_value = kwargs.get('threshold_value', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py new file mode 100644 index 000000000000..22ae6e7d274c --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/percentage_cost_threshold_properties_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PercentageCostThresholdProperties(Model): + """Properties of a percentage cost threshold. + + :param threshold_value: The cost threshold value. + :type threshold_value: float + """ + + _attribute_map = { + 'threshold_value': {'key': 'thresholdValue', 'type': 'float'}, + } + + def __init__(self, *, threshold_value: float=None, **kwargs) -> None: + super(PercentageCostThresholdProperties, self).__init__(**kwargs) + self.threshold_value = threshold_value diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py index bcd2c0344a2e..96719fffb5d7 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy.py @@ -37,7 +37,7 @@ class Policy(Resource): MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost' + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName :param fact_data: The fact data of the policy. :type fact_data: str @@ -51,11 +51,11 @@ class Policy(Resource): ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType :ivar created_date: The creation date of the policy. :vartype created_date: datetime - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource (Guid). - :type unique_identifier: str + :vartype unique_identifier: str """ _validation = { @@ -63,6 +63,8 @@ class Policy(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, } _attribute_map = { @@ -82,14 +84,14 @@ class Policy(Resource): 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, description=None, status=None, fact_name=None, fact_data=None, threshold=None, evaluator_type=None, provisioning_state=None, unique_identifier=None): - super(Policy, self).__init__(location=location, tags=tags) - self.description = description - self.status = status - self.fact_name = fact_name - self.fact_data = fact_data - self.threshold = threshold - self.evaluator_type = evaluator_type + def __init__(self, **kwargs): + super(Policy, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.status = kwargs.get('status', None) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.threshold = kwargs.get('threshold', None) + self.evaluator_type = kwargs.get('evaluator_type', None) self.created_date = None - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py index 87836e8ddcaa..4d240945e5a7 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment.py @@ -9,23 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .update_resource import UpdateResource -class PolicyFragment(Resource): +class PolicyFragment(UpdateResource): """A Policy. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str :param tags: The tags of the resource. :type tags: dict[str, str] :param description: The description of the policy. @@ -37,7 +26,7 @@ class PolicyFragment(Resource): MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', - 'LabTargetCost' + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName :param fact_data: The fact data of the policy. :type fact_data: str @@ -49,24 +38,9 @@ class PolicyFragment(Resource): 'AllowedValuesPolicy', 'MaxValuePolicy' :type evaluator_type: str or ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource - (Guid). - :type unique_identifier: str """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'str'}, @@ -74,17 +48,13 @@ class PolicyFragment(Resource): 'fact_data': {'key': 'properties.factData', 'type': 'str'}, 'threshold': {'key': 'properties.threshold', 'type': 'str'}, 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, description=None, status=None, fact_name=None, fact_data=None, threshold=None, evaluator_type=None, provisioning_state=None, unique_identifier=None): - super(PolicyFragment, self).__init__(location=location, tags=tags) - self.description = description - self.status = status - self.fact_name = fact_name - self.fact_data = fact_data - self.threshold = threshold - self.evaluator_type = evaluator_type - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + def __init__(self, **kwargs): + super(PolicyFragment, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.status = kwargs.get('status', None) + self.fact_name = kwargs.get('fact_name', None) + self.fact_data = kwargs.get('fact_data', None) + self.threshold = kwargs.get('threshold', None) + self.evaluator_type = kwargs.get('evaluator_type', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py new file mode 100644 index 000000000000..b10648b0cdc7 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_fragment_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource_py3 import UpdateResource + + +class PolicyFragment(UpdateResource): + """A Policy. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + } + + def __init__(self, *, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: + super(PolicyFragment, self).__init__(tags=tags, **kwargs) + self.description = description + self.status = status + self.fact_name = fact_name + self.fact_data = fact_data + self.threshold = threshold + self.evaluator_type = evaluator_type diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py new file mode 100644 index 000000000000..1bfd40ab2402 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_py3.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class Policy(Resource): + """A Policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param description: The description of the policy. + :type description: str + :param status: The status of the policy. Possible values include: + 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.PolicyStatus + :param fact_name: The fact name of the policy (e.g. LabVmCount, LabVmSize, + MaxVmsAllowedPerLab, etc. Possible values include: 'UserOwnedLabVmCount', + 'UserOwnedLabPremiumVmCount', 'LabVmCount', 'LabPremiumVmCount', + 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet', + 'LabTargetCost', 'EnvironmentTemplate', 'ScheduleEditPermission' + :type fact_name: str or ~azure.mgmt.devtestlabs.models.PolicyFactName + :param fact_data: The fact data of the policy. + :type fact_data: str + :param threshold: The threshold of the policy (i.e. a number for + MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). + :type threshold: str + :param evaluator_type: The evaluator type of the policy (i.e. + AllowedValuesPolicy, MaxValuePolicy). Possible values include: + 'AllowedValuesPolicy', 'MaxValuePolicy' + :type evaluator_type: str or + ~azure.mgmt.devtestlabs.models.PolicyEvaluatorType + :ivar created_date: The creation date of the policy. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'fact_name': {'key': 'properties.factName', 'type': 'str'}, + 'fact_data': {'key': 'properties.factData', 'type': 'str'}, + 'threshold': {'key': 'properties.threshold', 'type': 'str'}, + 'evaluator_type': {'key': 'properties.evaluatorType', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, description: str=None, status=None, fact_name=None, fact_data: str=None, threshold: str=None, evaluator_type=None, **kwargs) -> None: + super(Policy, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.status = status + self.fact_name = fact_name + self.fact_data = fact_data + self.threshold = threshold + self.evaluator_type = evaluator_type + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py index ca43d221b538..3dc1698dc354 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result.py @@ -28,7 +28,7 @@ class PolicySetResult(Model): 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, } - def __init__(self, has_error=None, policy_violations=None): - super(PolicySetResult, self).__init__() - self.has_error = has_error - self.policy_violations = policy_violations + def __init__(self, **kwargs): + super(PolicySetResult, self).__init__(**kwargs) + self.has_error = kwargs.get('has_error', None) + self.policy_violations = kwargs.get('policy_violations', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py new file mode 100644 index 000000000000..5368647ec498 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_set_result_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PolicySetResult(Model): + """Result of a policy set evaluation. + + :param has_error: A value indicating whether this policy set evaluation + has discovered violations. + :type has_error: bool + :param policy_violations: The list of policy violations. + :type policy_violations: + list[~azure.mgmt.devtestlabs.models.PolicyViolation] + """ + + _attribute_map = { + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'policy_violations': {'key': 'policyViolations', 'type': '[PolicyViolation]'}, + } + + def __init__(self, *, has_error: bool=None, policy_violations=None, **kwargs) -> None: + super(PolicySetResult, self).__init__(**kwargs) + self.has_error = has_error + self.policy_violations = policy_violations diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py index 912d6438dad1..b8404db70da6 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation.py @@ -26,7 +26,7 @@ class PolicyViolation(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, code=None, message=None): - super(PolicyViolation, self).__init__() - self.code = code - self.message = message + def __init__(self, **kwargs): + super(PolicyViolation, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py new file mode 100644 index 000000000000..8f33f97afeed --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/policy_violation_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PolicyViolation(Model): + """Policy violation. + + :param code: The code of the policy violation. + :type code: str + :param message: The message of the policy violation. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(PolicyViolation, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py index 7803b1a8e9ab..794610b68871 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py @@ -28,7 +28,7 @@ class Port(Model): 'backend_port': {'key': 'backendPort', 'type': 'int'}, } - def __init__(self, transport_protocol=None, backend_port=None): - super(Port, self).__init__() - self.transport_protocol = transport_protocol - self.backend_port = backend_port + def __init__(self, **kwargs): + super(Port, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.backend_port = kwargs.get('backend_port', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py index d6a5418aa7b7..60e28efa9dd8 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment.py @@ -28,7 +28,7 @@ class PortFragment(Model): 'backend_port': {'key': 'backendPort', 'type': 'int'}, } - def __init__(self, transport_protocol=None, backend_port=None): - super(PortFragment, self).__init__() - self.transport_protocol = transport_protocol - self.backend_port = backend_port + def __init__(self, **kwargs): + super(PortFragment, self).__init__(**kwargs) + self.transport_protocol = kwargs.get('transport_protocol', None) + self.backend_port = kwargs.get('backend_port', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py new file mode 100644 index 000000000000..dd39e446c5ff --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_fragment_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PortFragment(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: + super(PortFragment, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.backend_port = backend_port diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py new file mode 100644 index 000000000000..c4b7645a0a18 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Port(Model): + """Properties of a network port. + + :param transport_protocol: Protocol type of the port. Possible values + include: 'Tcp', 'Udp' + :type transport_protocol: str or + ~azure.mgmt.devtestlabs.models.TransportProtocol + :param backend_port: Backend port of the target virtual machine. + :type backend_port: int + """ + + _attribute_map = { + 'transport_protocol': {'key': 'transportProtocol', 'type': 'str'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__(self, *, transport_protocol=None, backend_port: int=None, **kwargs) -> None: + super(Port, self).__init__(**kwargs) + self.transport_protocol = transport_protocol + self.backend_port = backend_port diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py new file mode 100644 index 000000000000..71926d62a621 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RdpConnection(Model): + """Represents a .rdp file. + + :param contents: The contents of the .rdp file + :type contents: str + """ + + _attribute_map = { + 'contents': {'key': 'contents', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RdpConnection, self).__init__(**kwargs) + self.contents = kwargs.get('contents', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py new file mode 100644 index 000000000000..3f92de164fea --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/rdp_connection_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RdpConnection(Model): + """Represents a .rdp file. + + :param contents: The contents of the .rdp file + :type contents: str + """ + + _attribute_map = { + 'contents': {'key': 'contents', 'type': 'str'}, + } + + def __init__(self, *, contents: str=None, **kwargs) -> None: + super(RdpConnection, self).__init__(**kwargs) + self.contents = contents diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py new file mode 100644 index 000000000000..13725ea5e306 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResizeLabVirtualMachineProperties(Model): + """Request body for resizing a virtual machine. + + :param size: Specifies the size of the virtual machine. + :type size: str + """ + + _attribute_map = { + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) + self.size = kwargs.get('size', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py new file mode 100644 index 000000000000..266b19149f7a --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resize_lab_virtual_machine_properties_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResizeLabVirtualMachineProperties(Model): + """Request body for resizing a virtual machine. + + :param size: Specifies the size of the virtual machine. + :type size: str + """ + + _attribute_map = { + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, *, size: str=None, **kwargs) -> None: + super(ResizeLabVirtualMachineProperties, self).__init__(**kwargs) + self.size = size diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py index e53347c4c6be..f25b57698413 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource.py @@ -44,10 +44,10 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, location=None, tags=None): - super(Resource, self).__init__() + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = location - self.tags = tags + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py new file mode 100644 index 000000000000..e59df581aa79 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/resource_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py index 527ed10a055d..210f4a7b2eca 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties.py @@ -28,7 +28,7 @@ class RetargetScheduleProperties(Model): 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, } - def __init__(self, current_resource_id=None, target_resource_id=None): - super(RetargetScheduleProperties, self).__init__() - self.current_resource_id = current_resource_id - self.target_resource_id = target_resource_id + def __init__(self, **kwargs): + super(RetargetScheduleProperties, self).__init__(**kwargs) + self.current_resource_id = kwargs.get('current_resource_id', None) + self.target_resource_id = kwargs.get('target_resource_id', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py new file mode 100644 index 000000000000..debd7258fb28 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/retarget_schedule_properties_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RetargetScheduleProperties(Model): + """Properties for retargeting a virtual machine schedule. + + :param current_resource_id: The resource Id of the virtual machine on + which the schedule operates + :type current_resource_id: str + :param target_resource_id: The resource Id of the virtual machine that the + schedule should be retargeted to + :type target_resource_id: str + """ + + _attribute_map = { + 'current_resource_id': {'key': 'currentResourceId', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__(self, *, current_resource_id: str=None, target_resource_id: str=None, **kwargs) -> None: + super(RetargetScheduleProperties, self).__init__(**kwargs) + self.current_resource_id = current_resource_id + self.target_resource_id = target_resource_id diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py index e5bbd2840b0c..a0c09919fa48 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule.py @@ -52,11 +52,11 @@ class Schedule(Resource): :vartype created_date: datetime :param target_resource_id: The resource ID to which the schedule belongs :type target_resource_id: str - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource (Guid). - :type unique_identifier: str + :vartype unique_identifier: str """ _validation = { @@ -64,6 +64,8 @@ class Schedule(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, } _attribute_map = { @@ -85,16 +87,16 @@ class Schedule(Resource): 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, status=None, task_type=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id=None, notification_settings=None, target_resource_id=None, provisioning_state=None, unique_identifier=None): - super(Schedule, self).__init__(location=location, tags=tags) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings + def __init__(self, **kwargs): + super(Schedule, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) self.created_date = None - self.target_resource_id = target_resource_id - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + self.target_resource_id = kwargs.get('target_resource_id', None) + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py new file mode 100644 index 000000000000..1eced41c432d --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScheduleCreationParameter(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ScheduleCreationParameter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py new file mode 100644 index 000000000000..e3f67d9d59bf --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScheduleCreationParameterFragment(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ScheduleCreationParameterFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py new file mode 100644 index 000000000000..47e9ece35bfb --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_fragment_py3.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScheduleCreationParameterFragment(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(ScheduleCreationParameterFragment, self).__init__(**kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id + self.name = name + self.location = location + self.tags = tags diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py new file mode 100644 index 000000000000..8254f67c85be --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_creation_parameter_py3.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScheduleCreationParameter(Model): + """Properties for creating a schedule. + + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :param name: The name of the virtual machine or environment + :type name: str + :param location: The location of the new virtual machine or environment + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, name: str=None, location: str=None, tags=None, **kwargs) -> None: + super(ScheduleCreationParameter, self).__init__(**kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id + self.name = name + self.location = location + self.tags = tags diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py index 926efa4a2c73..17cb84a52572 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment.py @@ -9,23 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .update_resource import UpdateResource -class ScheduleFragment(Resource): +class ScheduleFragment(UpdateResource): """A schedule. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str :param tags: The tags of the resource. :type tags: dict[str, str] :param status: The status of the schedule (i.e. Enabled, Disabled). @@ -52,24 +41,9 @@ class ScheduleFragment(Resource): ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment :param target_resource_id: The resource ID to which the schedule belongs :type target_resource_id: str - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource - (Guid). - :type unique_identifier: str """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'status': {'key': 'properties.status', 'type': 'str'}, 'task_type': {'key': 'properties.taskType', 'type': 'str'}, @@ -79,19 +53,15 @@ class ScheduleFragment(Resource): 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, status=None, task_type=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id=None, notification_settings=None, target_resource_id=None, provisioning_state=None, unique_identifier=None): - super(ScheduleFragment, self).__init__(location=location, tags=tags) - self.status = status - self.task_type = task_type - self.weekly_recurrence = weekly_recurrence - self.daily_recurrence = daily_recurrence - self.hourly_recurrence = hourly_recurrence - self.time_zone_id = time_zone_id - self.notification_settings = notification_settings - self.target_resource_id = target_resource_id - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + def __init__(self, **kwargs): + super(ScheduleFragment, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.task_type = kwargs.get('task_type', None) + self.weekly_recurrence = kwargs.get('weekly_recurrence', None) + self.daily_recurrence = kwargs.get('daily_recurrence', None) + self.hourly_recurrence = kwargs.get('hourly_recurrence', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.notification_settings = kwargs.get('notification_settings', None) + self.target_resource_id = kwargs.get('target_resource_id', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py new file mode 100644 index 000000000000..a51222b2406e --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_fragment_py3.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource_py3 import UpdateResource + + +class ScheduleFragment(UpdateResource): + """A schedule. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: + ~azure.mgmt.devtestlabs.models.WeekDetailsFragment + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetailsFragment + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: + ~azure.mgmt.devtestlabs.models.HourDetailsFragment + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettingsFragment + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetailsFragment'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetailsFragment'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetailsFragment'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettingsFragment'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: + super(ScheduleFragment, self).__init__(tags=tags, **kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.target_resource_id = target_resource_id diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py new file mode 100644 index 000000000000..efd16216ef6e --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/schedule_py3.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class Schedule(Resource): + """A schedule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param status: The status of the schedule (i.e. Enabled, Disabled). + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.EnableStatus + :param task_type: The task type of the schedule (e.g. LabVmsShutdownTask, + LabVmAutoStart). + :type task_type: str + :param weekly_recurrence: If the schedule will occur only some days of the + week, specify the weekly recurrence. + :type weekly_recurrence: ~azure.mgmt.devtestlabs.models.WeekDetails + :param daily_recurrence: If the schedule will occur once each day of the + week, specify the daily recurrence. + :type daily_recurrence: ~azure.mgmt.devtestlabs.models.DayDetails + :param hourly_recurrence: If the schedule will occur multiple times a day, + specify the hourly recurrence. + :type hourly_recurrence: ~azure.mgmt.devtestlabs.models.HourDetails + :param time_zone_id: The time zone ID (e.g. Pacific Standard time). + :type time_zone_id: str + :param notification_settings: Notification settings. + :type notification_settings: + ~azure.mgmt.devtestlabs.models.NotificationSettings + :ivar created_date: The creation date of the schedule. + :vartype created_date: datetime + :param target_resource_id: The resource ID to which the schedule belongs + :type target_resource_id: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'task_type': {'key': 'properties.taskType', 'type': 'str'}, + 'weekly_recurrence': {'key': 'properties.weeklyRecurrence', 'type': 'WeekDetails'}, + 'daily_recurrence': {'key': 'properties.dailyRecurrence', 'type': 'DayDetails'}, + 'hourly_recurrence': {'key': 'properties.hourlyRecurrence', 'type': 'HourDetails'}, + 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, + 'notification_settings': {'key': 'properties.notificationSettings', 'type': 'NotificationSettings'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, status=None, task_type: str=None, weekly_recurrence=None, daily_recurrence=None, hourly_recurrence=None, time_zone_id: str=None, notification_settings=None, target_resource_id: str=None, **kwargs) -> None: + super(Schedule, self).__init__(location=location, tags=tags, **kwargs) + self.status = status + self.task_type = task_type + self.weekly_recurrence = weekly_recurrence + self.daily_recurrence = daily_recurrence + self.hourly_recurrence = hourly_recurrence + self.time_zone_id = time_zone_id + self.notification_settings = notification_settings + self.created_date = None + self.target_resource_id = target_resource_id + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py index 99a80c99a719..ae1048a9e9ec 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret.py @@ -30,17 +30,19 @@ class Secret(Resource): :type tags: dict[str, str] :param value: The value of the secret for secret creation. :type value: str - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource (Guid). - :type unique_identifier: str + :vartype unique_identifier: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, } _attribute_map = { @@ -54,8 +56,8 @@ class Secret(Resource): 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, value=None, provisioning_state=None, unique_identifier=None): - super(Secret, self).__init__(location=location, tags=tags) - self.value = value - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + def __init__(self, **kwargs): + super(Secret, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py new file mode 100644 index 000000000000..06df551c944b --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource import UpdateResource + + +class SecretFragment(UpdateResource): + """A secret. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretFragment, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py new file mode 100644 index 000000000000..64907637295e --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_fragment_py3.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource_py3 import UpdateResource + + +class SecretFragment(UpdateResource): + """A secret. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, *, tags=None, value: str=None, **kwargs) -> None: + super(SecretFragment, self).__init__(tags=tags, **kwargs) + self.value = value diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py new file mode 100644 index 000000000000..16b45cb8ccde --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/secret_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class Secret(Resource): + """A secret. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, value: str=None, **kwargs) -> None: + super(Secret, self).__init__(location=location, tags=tags, **kwargs) + self.value = value + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py new file mode 100644 index 000000000000..e8f46ff06337 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ServiceFabric(Resource): + """A Service Fabric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceFabric, self).__init__(**kwargs) + self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) + self.environment_id = kwargs.get('environment_id', None) + self.applicable_schedule = None + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py new file mode 100644 index 000000000000..8feb8f2b0dcd --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource import UpdateResource + + +class ServiceFabricFragment(UpdateResource): + """A Service Fabric. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceFabricFragment, self).__init__(**kwargs) + self.external_service_fabric_id = kwargs.get('external_service_fabric_id', None) + self.environment_id = kwargs.get('environment_id', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py new file mode 100644 index 000000000000..a1471c5984ea --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_fragment_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource_py3 import UpdateResource + + +class ServiceFabricFragment(UpdateResource): + """A Service Fabric. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + } + + def __init__(self, *, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: + super(ServiceFabricFragment, self).__init__(tags=tags, **kwargs) + self.external_service_fabric_id = external_service_fabric_id + self.environment_id = environment_id diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py new file mode 100644 index 000000000000..7de95722931e --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ServiceFabricPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceFabric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceFabric]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceFabricPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py new file mode 100644 index 000000000000..50cf5f715bf4 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_fabric_py3.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ServiceFabric(Resource): + """A Service Fabric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param external_service_fabric_id: The backing service fabric resource's + id + :type external_service_fabric_id: str + :param environment_id: The resource id of the environment under which the + service fabric resource is present + :type environment_id: str + :ivar applicable_schedule: The applicable schedule for the virtual + machine. + :vartype applicable_schedule: + ~azure.mgmt.devtestlabs.models.ApplicableSchedule + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'applicable_schedule': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'external_service_fabric_id': {'key': 'properties.externalServiceFabricId', 'type': 'str'}, + 'environment_id': {'key': 'properties.environmentId', 'type': 'str'}, + 'applicable_schedule': {'key': 'properties.applicableSchedule', 'type': 'ApplicableSchedule'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, external_service_fabric_id: str=None, environment_id: str=None, **kwargs) -> None: + super(ServiceFabric, self).__init__(location=location, tags=tags, **kwargs) + self.external_service_fabric_id = external_service_fabric_id + self.environment_id = environment_id + self.applicable_schedule = None + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py index c35967c4b362..38d8100572ac 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner.py @@ -47,6 +47,6 @@ class ServiceRunner(Resource): 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, } - def __init__(self, location=None, tags=None, identity=None): - super(ServiceRunner, self).__init__(location=location, tags=tags) - self.identity = identity + def __init__(self, **kwargs): + super(ServiceRunner, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py new file mode 100644 index 000000000000..5afa18026e0c --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/service_runner_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ServiceRunner(Resource): + """A container for a managed identity to execute DevTest lab services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.devtestlabs.models.IdentityProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + } + + def __init__(self, *, location: str=None, tags=None, identity=None, **kwargs) -> None: + super(ServiceRunner, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py index 90df64dd23ed..c372a21093bd 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration.py @@ -25,6 +25,6 @@ class SharedPublicIpAddressConfiguration(Model): 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, } - def __init__(self, inbound_nat_rules=None): - super(SharedPublicIpAddressConfiguration, self).__init__() - self.inbound_nat_rules = inbound_nat_rules + def __init__(self, **kwargs): + super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py index 92c57ea03aa1..48eef7b014cc 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment.py @@ -25,6 +25,6 @@ class SharedPublicIpAddressConfigurationFragment(Model): 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, } - def __init__(self, inbound_nat_rules=None): - super(SharedPublicIpAddressConfigurationFragment, self).__init__() - self.inbound_nat_rules = inbound_nat_rules + def __init__(self, **kwargs): + super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py new file mode 100644 index 000000000000..d2121254c806 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_fragment_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SharedPublicIpAddressConfigurationFragment(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRuleFragment] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRuleFragment]'}, + } + + def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: + super(SharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.inbound_nat_rules = inbound_nat_rules diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py new file mode 100644 index 000000000000..13c9209e5140 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shared_public_ip_address_configuration_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SharedPublicIpAddressConfiguration(Model): + """Properties of a virtual machine that determine how it is connected to a + load balancer. + + :param inbound_nat_rules: The incoming NAT rules + :type inbound_nat_rules: + list[~azure.mgmt.devtestlabs.models.InboundNatRule] + """ + + _attribute_map = { + 'inbound_nat_rules': {'key': 'inboundNatRules', 'type': '[InboundNatRule]'}, + } + + def __init__(self, *, inbound_nat_rules=None, **kwargs) -> None: + super(SharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.inbound_nat_rules = inbound_nat_rules diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py index 6205b4aad5f1..00b760315ab8 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content.py @@ -29,6 +29,10 @@ class ShutdownNotificationContent(Model): :type guid: str :param owner: The owner of the virtual machine. :type owner: str + :param vm_url: The URL of the virtual machine. + :type vm_url: str + :param minutes_until_shutdown: Minutes remaining until shutdown + :type minutes_until_shutdown: str :param event_type: The event for which a notification will be sent. :type event_type: str :param text: The text for the notification. @@ -48,6 +52,8 @@ class ShutdownNotificationContent(Model): 'vm_name': {'key': 'vmName', 'type': 'str'}, 'guid': {'key': 'guid', 'type': 'str'}, 'owner': {'key': 'owner', 'type': 'str'}, + 'vm_url': {'key': 'vmUrl', 'type': 'str'}, + 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, 'event_type': {'key': 'eventType', 'type': 'str'}, 'text': {'key': 'text', 'type': 'str'}, 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, @@ -55,16 +61,18 @@ class ShutdownNotificationContent(Model): 'lab_name': {'key': 'labName', 'type': 'str'}, } - def __init__(self, skip_url=None, delay_url60=None, delay_url120=None, vm_name=None, guid=None, owner=None, event_type=None, text=None, subscription_id=None, resource_group_name=None, lab_name=None): - super(ShutdownNotificationContent, self).__init__() - self.skip_url = skip_url - self.delay_url60 = delay_url60 - self.delay_url120 = delay_url120 - self.vm_name = vm_name - self.guid = guid - self.owner = owner - self.event_type = event_type - self.text = text - self.subscription_id = subscription_id - self.resource_group_name = resource_group_name - self.lab_name = lab_name + def __init__(self, **kwargs): + super(ShutdownNotificationContent, self).__init__(**kwargs) + self.skip_url = kwargs.get('skip_url', None) + self.delay_url60 = kwargs.get('delay_url60', None) + self.delay_url120 = kwargs.get('delay_url120', None) + self.vm_name = kwargs.get('vm_name', None) + self.guid = kwargs.get('guid', None) + self.owner = kwargs.get('owner', None) + self.vm_url = kwargs.get('vm_url', None) + self.minutes_until_shutdown = kwargs.get('minutes_until_shutdown', None) + self.event_type = kwargs.get('event_type', None) + self.text = kwargs.get('text', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.lab_name = kwargs.get('lab_name', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py new file mode 100644 index 000000000000..47242c6a1816 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/shutdown_notification_content_py3.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ShutdownNotificationContent(Model): + """The contents of a shutdown notification. Webhooks can use this type to + deserialize the request body when they get notified of an imminent + shutdown. + + :param skip_url: The URL to skip auto-shutdown. + :type skip_url: str + :param delay_url60: The URL to delay shutdown by 60 minutes. + :type delay_url60: str + :param delay_url120: The URL to delay shutdown by 2 hours. + :type delay_url120: str + :param vm_name: The virtual machine to be shut down. + :type vm_name: str + :param guid: The GUID for the virtual machine to be shut down. + :type guid: str + :param owner: The owner of the virtual machine. + :type owner: str + :param vm_url: The URL of the virtual machine. + :type vm_url: str + :param minutes_until_shutdown: Minutes remaining until shutdown + :type minutes_until_shutdown: str + :param event_type: The event for which a notification will be sent. + :type event_type: str + :param text: The text for the notification. + :type text: str + :param subscription_id: The subscription ID for the schedule. + :type subscription_id: str + :param resource_group_name: The resource group name for the schedule. + :type resource_group_name: str + :param lab_name: The lab for the schedule. + :type lab_name: str + """ + + _attribute_map = { + 'skip_url': {'key': 'skipUrl', 'type': 'str'}, + 'delay_url60': {'key': 'delayUrl60', 'type': 'str'}, + 'delay_url120': {'key': 'delayUrl120', 'type': 'str'}, + 'vm_name': {'key': 'vmName', 'type': 'str'}, + 'guid': {'key': 'guid', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'str'}, + 'vm_url': {'key': 'vmUrl', 'type': 'str'}, + 'minutes_until_shutdown': {'key': 'minutesUntilShutdown', 'type': 'str'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'lab_name': {'key': 'labName', 'type': 'str'}, + } + + def __init__(self, *, skip_url: str=None, delay_url60: str=None, delay_url120: str=None, vm_name: str=None, guid: str=None, owner: str=None, vm_url: str=None, minutes_until_shutdown: str=None, event_type: str=None, text: str=None, subscription_id: str=None, resource_group_name: str=None, lab_name: str=None, **kwargs) -> None: + super(ShutdownNotificationContent, self).__init__(**kwargs) + self.skip_url = skip_url + self.delay_url60 = delay_url60 + self.delay_url120 = delay_url120 + self.vm_name = vm_name + self.guid = guid + self.owner = owner + self.vm_url = vm_url + self.minutes_until_shutdown = minutes_until_shutdown + self.event_type = event_type + self.text = text + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.lab_name = lab_name diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py index dc78626cf7c7..520ea0b84c0b 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet.py @@ -32,8 +32,8 @@ class Subnet(Model): 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, } - def __init__(self, resource_id=None, lab_subnet_name=None, allow_public_ip=None): - super(Subnet, self).__init__() - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.allow_public_ip = allow_public_ip + def __init__(self, **kwargs): + super(Subnet, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.allow_public_ip = kwargs.get('allow_public_ip', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py index c1abc6a4adf8..db484aef5efc 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment.py @@ -32,8 +32,8 @@ class SubnetFragment(Model): 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, } - def __init__(self, resource_id=None, lab_subnet_name=None, allow_public_ip=None): - super(SubnetFragment, self).__init__() - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.allow_public_ip = allow_public_ip + def __init__(self, **kwargs): + super(SubnetFragment, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.allow_public_ip = kwargs.get('allow_public_ip', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py new file mode 100644 index 000000000000..bdca8f51fc58 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_fragment_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubnetFragment(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: + super(SubnetFragment, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.allow_public_ip = allow_public_ip diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py index 5f8f6f9a6341..c091e516241d 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override.py @@ -47,11 +47,11 @@ class SubnetOverride(Model): 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, } - def __init__(self, resource_id=None, lab_subnet_name=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name=None): - super(SubnetOverride, self).__init__() - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.use_in_vm_creation_permission = use_in_vm_creation_permission - self.use_public_ip_address_permission = use_public_ip_address_permission - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration - self.virtual_network_pool_name = virtual_network_pool_name + def __init__(self, **kwargs): + super(SubnetOverride, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) + self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py index 2cb657a296df..839368724e6a 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment.py @@ -47,11 +47,11 @@ class SubnetOverrideFragment(Model): 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, } - def __init__(self, resource_id=None, lab_subnet_name=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name=None): - super(SubnetOverrideFragment, self).__init__() - self.resource_id = resource_id - self.lab_subnet_name = lab_subnet_name - self.use_in_vm_creation_permission = use_in_vm_creation_permission - self.use_public_ip_address_permission = use_public_ip_address_permission - self.shared_public_ip_address_configuration = shared_public_ip_address_configuration - self.virtual_network_pool_name = virtual_network_pool_name + def __init__(self, **kwargs): + super(SubnetOverrideFragment, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.lab_subnet_name = kwargs.get('lab_subnet_name', None) + self.use_in_vm_creation_permission = kwargs.get('use_in_vm_creation_permission', None) + self.use_public_ip_address_permission = kwargs.get('use_public_ip_address_permission', None) + self.shared_public_ip_address_configuration = kwargs.get('shared_public_ip_address_configuration', None) + self.virtual_network_pool_name = kwargs.get('virtual_network_pool_name', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py new file mode 100644 index 000000000000..a48b90a27c65 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_fragment_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubnetOverrideFragment(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfigurationFragment + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfigurationFragment'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: + super(SubnetOverrideFragment, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.use_in_vm_creation_permission = use_in_vm_creation_permission + self.use_public_ip_address_permission = use_public_ip_address_permission + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + self.virtual_network_pool_name = virtual_network_pool_name diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py new file mode 100644 index 000000000000..30ddcbe9a971 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_override_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubnetOverride(Model): + """Property overrides on a subnet of a virtual network. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name given to the subnet within the lab. + :type lab_subnet_name: str + :param use_in_vm_creation_permission: Indicates whether this subnet can be + used during virtual machine creation (i.e. Allow, Deny). Possible values + include: 'Default', 'Deny', 'Allow' + :type use_in_vm_creation_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param use_public_ip_address_permission: Indicates whether public IP + addresses can be assigned to virtual machines on this subnet (i.e. Allow, + Deny). Possible values include: 'Default', 'Deny', 'Allow' + :type use_public_ip_address_permission: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + :param shared_public_ip_address_configuration: Properties that virtual + machines on this subnet will share. + :type shared_public_ip_address_configuration: + ~azure.mgmt.devtestlabs.models.SubnetSharedPublicIpAddressConfiguration + :param virtual_network_pool_name: The virtual network pool associated with + this subnet. + :type virtual_network_pool_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'use_in_vm_creation_permission': {'key': 'useInVmCreationPermission', 'type': 'str'}, + 'use_public_ip_address_permission': {'key': 'usePublicIpAddressPermission', 'type': 'str'}, + 'shared_public_ip_address_configuration': {'key': 'sharedPublicIpAddressConfiguration', 'type': 'SubnetSharedPublicIpAddressConfiguration'}, + 'virtual_network_pool_name': {'key': 'virtualNetworkPoolName', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, use_in_vm_creation_permission=None, use_public_ip_address_permission=None, shared_public_ip_address_configuration=None, virtual_network_pool_name: str=None, **kwargs) -> None: + super(SubnetOverride, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.use_in_vm_creation_permission = use_in_vm_creation_permission + self.use_public_ip_address_permission = use_public_ip_address_permission + self.shared_public_ip_address_configuration = shared_public_ip_address_configuration + self.virtual_network_pool_name = virtual_network_pool_name diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py new file mode 100644 index 000000000000..6faba11229c2 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Subnet(Model): + """Subnet information. + + :param resource_id: The resource ID of the subnet. + :type resource_id: str + :param lab_subnet_name: The name of the subnet as seen in the lab. + :type lab_subnet_name: str + :param allow_public_ip: The permission policy of the subnet for allowing + public IP addresses (i.e. Allow, Deny)). Possible values include: + 'Default', 'Deny', 'Allow' + :type allow_public_ip: str or + ~azure.mgmt.devtestlabs.models.UsagePermissionType + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'lab_subnet_name': {'key': 'labSubnetName', 'type': 'str'}, + 'allow_public_ip': {'key': 'allowPublicIp', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, lab_subnet_name: str=None, allow_public_ip=None, **kwargs) -> None: + super(Subnet, self).__init__(**kwargs) + self.resource_id = resource_id + self.lab_subnet_name = lab_subnet_name + self.allow_public_ip = allow_public_ip diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py index 7af4cd59eedb..c300efe3e12a 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration.py @@ -24,6 +24,6 @@ class SubnetSharedPublicIpAddressConfiguration(Model): 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, } - def __init__(self, allowed_ports=None): - super(SubnetSharedPublicIpAddressConfiguration, self).__init__() - self.allowed_ports = allowed_ports + def __init__(self, **kwargs): + super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.allowed_ports = kwargs.get('allowed_ports', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py index 1a63bd29b4ab..737aba0c3385 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.py @@ -24,6 +24,6 @@ class SubnetSharedPublicIpAddressConfigurationFragment(Model): 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, } - def __init__(self, allowed_ports=None): - super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__() - self.allowed_ports = allowed_ports + def __init__(self, **kwargs): + super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.allowed_ports = kwargs.get('allowed_ports', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py new file mode 100644 index 000000000000..b108414e8db0 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubnetSharedPublicIpAddressConfigurationFragment(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.PortFragment] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[PortFragment]'}, + } + + def __init__(self, *, allowed_ports=None, **kwargs) -> None: + super(SubnetSharedPublicIpAddressConfigurationFragment, self).__init__(**kwargs) + self.allowed_ports = allowed_ports diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py new file mode 100644 index 000000000000..b0149a863f64 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/subnet_shared_public_ip_address_configuration_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubnetSharedPublicIpAddressConfiguration(Model): + """Configuration for public IP address sharing. + + :param allowed_ports: Backend ports that virtual machines on this subnet + are allowed to expose + :type allowed_ports: list[~azure.mgmt.devtestlabs.models.Port] + """ + + _attribute_map = { + 'allowed_ports': {'key': 'allowedPorts', 'type': '[Port]'}, + } + + def __init__(self, *, allowed_ports=None, **kwargs) -> None: + super(SubnetSharedPublicIpAddressConfiguration, self).__init__(**kwargs) + self.allowed_ports = allowed_ports diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py index b6850918668e..d6eca3dfd40e 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties.py @@ -41,11 +41,11 @@ class TargetCostProperties(Model): 'cycle_type': {'key': 'cycleType', 'type': 'str'}, } - def __init__(self, status=None, target=None, cost_thresholds=None, cycle_start_date_time=None, cycle_end_date_time=None, cycle_type=None): - super(TargetCostProperties, self).__init__() - self.status = status - self.target = target - self.cost_thresholds = cost_thresholds - self.cycle_start_date_time = cycle_start_date_time - self.cycle_end_date_time = cycle_end_date_time - self.cycle_type = cycle_type + def __init__(self, **kwargs): + super(TargetCostProperties, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.target = kwargs.get('target', None) + self.cost_thresholds = kwargs.get('cost_thresholds', None) + self.cycle_start_date_time = kwargs.get('cycle_start_date_time', None) + self.cycle_end_date_time = kwargs.get('cycle_end_date_time', None) + self.cycle_type = kwargs.get('cycle_type', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py new file mode 100644 index 000000000000..8e79d34b0ed9 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/target_cost_properties_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TargetCostProperties(Model): + """Properties of a cost target. + + :param status: Target cost status. Possible values include: 'Enabled', + 'Disabled' + :type status: str or ~azure.mgmt.devtestlabs.models.TargetCostStatus + :param target: Lab target cost + :type target: int + :param cost_thresholds: Cost thresholds. + :type cost_thresholds: + list[~azure.mgmt.devtestlabs.models.CostThresholdProperties] + :param cycle_start_date_time: Reporting cycle start date. + :type cycle_start_date_time: datetime + :param cycle_end_date_time: Reporting cycle end date. + :type cycle_end_date_time: datetime + :param cycle_type: Reporting cycle type. Possible values include: + 'CalendarMonth', 'Custom' + :type cycle_type: str or ~azure.mgmt.devtestlabs.models.ReportingCycleType + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'int'}, + 'cost_thresholds': {'key': 'costThresholds', 'type': '[CostThresholdProperties]'}, + 'cycle_start_date_time': {'key': 'cycleStartDateTime', 'type': 'iso-8601'}, + 'cycle_end_date_time': {'key': 'cycleEndDateTime', 'type': 'iso-8601'}, + 'cycle_type': {'key': 'cycleType', 'type': 'str'}, + } + + def __init__(self, *, status=None, target: int=None, cost_thresholds=None, cycle_start_date_time=None, cycle_end_date_time=None, cycle_type=None, **kwargs) -> None: + super(TargetCostProperties, self).__init__(**kwargs) + self.status = status + self.target = target + self.cost_thresholds = cost_thresholds + self.cycle_start_date_time = cycle_start_date_time + self.cycle_end_date_time = cycle_end_date_time + self.cycle_type = cycle_type diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py new file mode 100644 index 000000000000..4849be7f6102 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateResource(Model): + """Represents an update resource. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(UpdateResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py new file mode 100644 index 000000000000..62a3c23c2164 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/update_resource_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateResource(Model): + """Represents an update resource. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateResource, self).__init__(**kwargs) + self.tags = tags diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py index bfcfef897feb..28099b85f900 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user.py @@ -34,11 +34,11 @@ class User(Resource): :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore :ivar created_date: The creation date of the user profile. :vartype created_date: datetime - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource (Guid). - :type unique_identifier: str + :vartype unique_identifier: str """ _validation = { @@ -46,6 +46,8 @@ class User(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, } _attribute_map = { @@ -61,10 +63,10 @@ class User(Resource): 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, identity=None, secret_store=None, provisioning_state=None, unique_identifier=None): - super(User, self).__init__(location=location, tags=tags) - self.identity = identity - self.secret_store = secret_store + def __init__(self, **kwargs): + super(User, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.secret_store = kwargs.get('secret_store', None) self.created_date = None - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py index efe60bda40d8..cd9a685bdbbe 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment.py @@ -9,57 +9,27 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .update_resource import UpdateResource -class UserFragment(Resource): +class UserFragment(UpdateResource): """Profile of a lab user. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str :param tags: The tags of the resource. :type tags: dict[str, str] :param identity: The identity of the user. :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment :param secret_store: The secret store of the user. :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource - (Guid). - :type unique_identifier: str """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, identity=None, secret_store=None, provisioning_state=None, unique_identifier=None): - super(UserFragment, self).__init__(location=location, tags=tags) - self.identity = identity - self.secret_store = secret_store - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + def __init__(self, **kwargs): + super(UserFragment, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.secret_store = kwargs.get('secret_store', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py new file mode 100644 index 000000000000..357a81712e45 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_fragment_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource_py3 import UpdateResource + + +class UserFragment(UpdateResource): + """Profile of a lab user. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentityFragment + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStoreFragment + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentityFragment'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStoreFragment'}, + } + + def __init__(self, *, tags=None, identity=None, secret_store=None, **kwargs) -> None: + super(UserFragment, self).__init__(tags=tags, **kwargs) + self.identity = identity + self.secret_store = secret_store diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py index 43be4cc6d2a9..557f65e2b82f 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity.py @@ -40,10 +40,10 @@ class UserIdentity(Model): 'app_id': {'key': 'appId', 'type': 'str'}, } - def __init__(self, principal_name=None, principal_id=None, tenant_id=None, object_id=None, app_id=None): - super(UserIdentity, self).__init__() - self.principal_name = principal_name - self.principal_id = principal_id - self.tenant_id = tenant_id - self.object_id = object_id - self.app_id = app_id + def __init__(self, **kwargs): + super(UserIdentity, self).__init__(**kwargs) + self.principal_name = kwargs.get('principal_name', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.object_id = kwargs.get('object_id', None) + self.app_id = kwargs.get('app_id', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py index 74f00cce15d9..0783b56f47b3 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment.py @@ -40,10 +40,10 @@ class UserIdentityFragment(Model): 'app_id': {'key': 'appId', 'type': 'str'}, } - def __init__(self, principal_name=None, principal_id=None, tenant_id=None, object_id=None, app_id=None): - super(UserIdentityFragment, self).__init__() - self.principal_name = principal_name - self.principal_id = principal_id - self.tenant_id = tenant_id - self.object_id = object_id - self.app_id = app_id + def __init__(self, **kwargs): + super(UserIdentityFragment, self).__init__(**kwargs) + self.principal_name = kwargs.get('principal_name', None) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.object_id = kwargs.get('object_id', None) + self.app_id = kwargs.get('app_id', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py new file mode 100644 index 000000000000..3c2fdb6e005b --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_fragment_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UserIdentityFragment(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: + super(UserIdentityFragment, self).__init__(**kwargs) + self.principal_name = principal_name + self.principal_id = principal_id + self.tenant_id = tenant_id + self.object_id = object_id + self.app_id = app_id diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py new file mode 100644 index 000000000000..03615a6e15b7 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_identity_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UserIdentity(Model): + """Identity attributes of a lab user. + + :param principal_name: Set to the principal name / UPN of the client JWT + making the request. + :type principal_name: str + :param principal_id: Set to the principal Id of the client JWT making the + request. Service principal will not have the principal Id. + :type principal_id: str + :param tenant_id: Set to the tenant ID of the client JWT making the + request. + :type tenant_id: str + :param object_id: Set to the object Id of the client JWT making the + request. Not all users have object Id. For CSP (reseller) scenarios for + example, object Id is not available. + :type object_id: str + :param app_id: Set to the app Id of the client JWT making the request. + :type app_id: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + } + + def __init__(self, *, principal_name: str=None, principal_id: str=None, tenant_id: str=None, object_id: str=None, app_id: str=None, **kwargs) -> None: + super(UserIdentity, self).__init__(**kwargs) + self.principal_name = principal_name + self.principal_id = principal_id + self.tenant_id = tenant_id + self.object_id = object_id + self.app_id = app_id diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py new file mode 100644 index 000000000000..96d981829827 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_py3.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class User(Resource): + """Profile of a lab user. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param identity: The identity of the user. + :type identity: ~azure.mgmt.devtestlabs.models.UserIdentity + :param secret_store: The secret store of the user. + :type secret_store: ~azure.mgmt.devtestlabs.models.UserSecretStore + :ivar created_date: The creation date of the user profile. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'properties.identity', 'type': 'UserIdentity'}, + 'secret_store': {'key': 'properties.secretStore', 'type': 'UserSecretStore'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, identity=None, secret_store=None, **kwargs) -> None: + super(User, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.secret_store = secret_store + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py index 792c3ce44404..de4ee5cb6447 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store.py @@ -26,7 +26,7 @@ class UserSecretStore(Model): 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, } - def __init__(self, key_vault_uri=None, key_vault_id=None): - super(UserSecretStore, self).__init__() - self.key_vault_uri = key_vault_uri - self.key_vault_id = key_vault_id + def __init__(self, **kwargs): + super(UserSecretStore, self).__init__(**kwargs) + self.key_vault_uri = kwargs.get('key_vault_uri', None) + self.key_vault_id = kwargs.get('key_vault_id', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py index e39d9a4c9a88..7789bff72056 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py @@ -26,7 +26,7 @@ class UserSecretStoreFragment(Model): 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, } - def __init__(self, key_vault_uri=None, key_vault_id=None): - super(UserSecretStoreFragment, self).__init__() - self.key_vault_uri = key_vault_uri - self.key_vault_id = key_vault_id + def __init__(self, **kwargs): + super(UserSecretStoreFragment, self).__init__(**kwargs) + self.key_vault_uri = kwargs.get('key_vault_uri', None) + self.key_vault_id = kwargs.get('key_vault_id', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py new file mode 100644 index 000000000000..241c44664e06 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UserSecretStoreFragment(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: + super(UserSecretStoreFragment, self).__init__(**kwargs) + self.key_vault_uri = key_vault_uri + self.key_vault_id = key_vault_id diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py new file mode 100644 index 000000000000..ad56603f7926 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UserSecretStore(Model): + """Properties of a user's secret store. + + :param key_vault_uri: The URI of the user's Key vault. + :type key_vault_uri: str + :param key_vault_id: The ID of the user's Key vault. + :type key_vault_id: str + """ + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + } + + def __init__(self, *, key_vault_uri: str=None, key_vault_id: str=None, **kwargs) -> None: + super(UserSecretStore, self).__init__(**kwargs) + self.key_vault_uri = key_vault_uri + self.key_vault_id = key_vault_id diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py index d3e8f3992e46..460ae9a78af0 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network.py @@ -35,26 +35,29 @@ class VirtualNetwork(Resource): :param external_provider_resource_id: The Microsoft.Network resource identifier of the virtual network. :type external_provider_resource_id: str - :param external_subnets: The external subnet properties. - :type external_subnets: + :ivar external_subnets: The external subnet properties. + :vartype external_subnets: list[~azure.mgmt.devtestlabs.models.ExternalSubnet] :param subnet_overrides: The subnet overrides of the virtual network. :type subnet_overrides: list[~azure.mgmt.devtestlabs.models.SubnetOverride] :ivar created_date: The creation date of the virtual network. :vartype created_date: datetime - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource (Guid). - :type unique_identifier: str + :vartype unique_identifier: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'external_subnets': {'readonly': True}, 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, } _attribute_map = { @@ -73,13 +76,13 @@ class VirtualNetwork(Resource): 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, allowed_subnets=None, description=None, external_provider_resource_id=None, external_subnets=None, subnet_overrides=None, provisioning_state=None, unique_identifier=None): - super(VirtualNetwork, self).__init__(location=location, tags=tags) - self.allowed_subnets = allowed_subnets - self.description = description - self.external_provider_resource_id = external_provider_resource_id - self.external_subnets = external_subnets - self.subnet_overrides = subnet_overrides + def __init__(self, **kwargs): + super(VirtualNetwork, self).__init__(**kwargs) + self.allowed_subnets = kwargs.get('allowed_subnets', None) + self.description = kwargs.get('description', None) + self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) + self.external_subnets = None + self.subnet_overrides = kwargs.get('subnet_overrides', None) self.created_date = None - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py index 33f0cb107eb9..4840d07f21bb 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment.py @@ -9,23 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .update_resource import UpdateResource -class VirtualNetworkFragment(Resource): +class VirtualNetworkFragment(UpdateResource): """A virtual network. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The identifier of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :param location: The location of the resource. - :type location: str :param tags: The tags of the resource. :type tags: dict[str, str] :param allowed_subnets: The allowed subnets of the virtual network. @@ -35,46 +24,22 @@ class VirtualNetworkFragment(Resource): :param external_provider_resource_id: The Microsoft.Network resource identifier of the virtual network. :type external_provider_resource_id: str - :param external_subnets: The external subnet properties. - :type external_subnets: - list[~azure.mgmt.devtestlabs.models.ExternalSubnetFragment] :param subnet_overrides: The subnet overrides of the virtual network. :type subnet_overrides: list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] - :param provisioning_state: The provisioning status of the resource. - :type provisioning_state: str - :param unique_identifier: The unique immutable identifier of a resource - (Guid). - :type unique_identifier: str """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, - 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnetFragment]'}, 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, } - def __init__(self, location=None, tags=None, allowed_subnets=None, description=None, external_provider_resource_id=None, external_subnets=None, subnet_overrides=None, provisioning_state=None, unique_identifier=None): - super(VirtualNetworkFragment, self).__init__(location=location, tags=tags) - self.allowed_subnets = allowed_subnets - self.description = description - self.external_provider_resource_id = external_provider_resource_id - self.external_subnets = external_subnets - self.subnet_overrides = subnet_overrides - self.provisioning_state = provisioning_state - self.unique_identifier = unique_identifier + def __init__(self, **kwargs): + super(VirtualNetworkFragment, self).__init__(**kwargs) + self.allowed_subnets = kwargs.get('allowed_subnets', None) + self.description = kwargs.get('description', None) + self.external_provider_resource_id = kwargs.get('external_provider_resource_id', None) + self.subnet_overrides = kwargs.get('subnet_overrides', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py new file mode 100644 index 000000000000..bdc572018008 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_fragment_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .update_resource_py3 import UpdateResource + + +class VirtualNetworkFragment(UpdateResource): + """A virtual network. + + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.SubnetFragment] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverrideFragment] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[SubnetFragment]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverrideFragment]'}, + } + + def __init__(self, *, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: + super(VirtualNetworkFragment, self).__init__(tags=tags, **kwargs) + self.allowed_subnets = allowed_subnets + self.description = description + self.external_provider_resource_id = external_provider_resource_id + self.subnet_overrides = subnet_overrides diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py new file mode 100644 index 000000000000..4af05c325513 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/virtual_network_py3.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class VirtualNetwork(Resource): + """A virtual network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The identifier of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. + :type location: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param allowed_subnets: The allowed subnets of the virtual network. + :type allowed_subnets: list[~azure.mgmt.devtestlabs.models.Subnet] + :param description: The description of the virtual network. + :type description: str + :param external_provider_resource_id: The Microsoft.Network resource + identifier of the virtual network. + :type external_provider_resource_id: str + :ivar external_subnets: The external subnet properties. + :vartype external_subnets: + list[~azure.mgmt.devtestlabs.models.ExternalSubnet] + :param subnet_overrides: The subnet overrides of the virtual network. + :type subnet_overrides: + list[~azure.mgmt.devtestlabs.models.SubnetOverride] + :ivar created_date: The creation date of the virtual network. + :vartype created_date: datetime + :ivar provisioning_state: The provisioning status of the resource. + :vartype provisioning_state: str + :ivar unique_identifier: The unique immutable identifier of a resource + (Guid). + :vartype unique_identifier: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'external_subnets': {'readonly': True}, + 'created_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'unique_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'allowed_subnets': {'key': 'properties.allowedSubnets', 'type': '[Subnet]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_provider_resource_id': {'key': 'properties.externalProviderResourceId', 'type': 'str'}, + 'external_subnets': {'key': 'properties.externalSubnets', 'type': '[ExternalSubnet]'}, + 'subnet_overrides': {'key': 'properties.subnetOverrides', 'type': '[SubnetOverride]'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'unique_identifier': {'key': 'properties.uniqueIdentifier', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, allowed_subnets=None, description: str=None, external_provider_resource_id: str=None, subnet_overrides=None, **kwargs) -> None: + super(VirtualNetwork, self).__init__(location=location, tags=tags, **kwargs) + self.allowed_subnets = allowed_subnets + self.description = description + self.external_provider_resource_id = external_provider_resource_id + self.external_subnets = None + self.subnet_overrides = subnet_overrides + self.created_date = None + self.provisioning_state = None + self.unique_identifier = None diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py index 139e3e997ca5..92d7a61279c1 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details.py @@ -27,7 +27,7 @@ class WeekDetails(Model): 'time': {'key': 'time', 'type': 'str'}, } - def __init__(self, weekdays=None, time=None): - super(WeekDetails, self).__init__() - self.weekdays = weekdays - self.time = time + def __init__(self, **kwargs): + super(WeekDetails, self).__init__(**kwargs) + self.weekdays = kwargs.get('weekdays', None) + self.time = kwargs.get('time', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py index fa79ce474b7d..f40c5e26d54a 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment.py @@ -27,7 +27,7 @@ class WeekDetailsFragment(Model): 'time': {'key': 'time', 'type': 'str'}, } - def __init__(self, weekdays=None, time=None): - super(WeekDetailsFragment, self).__init__() - self.weekdays = weekdays - self.time = time + def __init__(self, **kwargs): + super(WeekDetailsFragment, self).__init__(**kwargs) + self.weekdays = kwargs.get('weekdays', None) + self.time = kwargs.get('time', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py new file mode 100644 index 000000000000..4521250deffc --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_fragment_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WeekDetailsFragment(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: + super(WeekDetailsFragment, self).__init__(**kwargs) + self.weekdays = weekdays + self.time = time diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py new file mode 100644 index 000000000000..d3bdddf6f4e4 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/week_details_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WeekDetails(Model): + """Properties of a weekly schedule. + + :param weekdays: The days of the week for which the schedule is set (e.g. + Sunday, Monday, Tuesday, etc.). + :type weekdays: list[str] + :param time: The time of the day the schedule will occur. + :type time: str + """ + + _attribute_map = { + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + 'time': {'key': 'time', 'type': 'str'}, + } + + def __init__(self, *, weekdays=None, time: str=None, **kwargs) -> None: + super(WeekDetails, self).__init__(**kwargs) + self.weekdays = weekdays + self.time = time diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py index 5062b4159ea9..377c585b9162 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info.py @@ -26,6 +26,6 @@ class WindowsOsInfo(Model): 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, } - def __init__(self, windows_os_state=None): - super(WindowsOsInfo, self).__init__() - self.windows_os_state = windows_os_state + def __init__(self, **kwargs): + super(WindowsOsInfo, self).__init__(**kwargs) + self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py new file mode 100644 index 000000000000..c54bfea8922a --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WindowsOsInfoFragment(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WindowsOsInfoFragment, self).__init__(**kwargs) + self.windows_os_state = kwargs.get('windows_os_state', None) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py new file mode 100644 index 000000000000..e2009eab0094 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_fragment_py3.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WindowsOsInfoFragment(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, *, windows_os_state=None, **kwargs) -> None: + super(WindowsOsInfoFragment, self).__init__(**kwargs) + self.windows_os_state = windows_os_state diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py new file mode 100644 index 000000000000..6c59c08b3f5a --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/windows_os_info_py3.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WindowsOsInfo(Model): + """Information about a Windows OS. + + :param windows_os_state: The state of the Windows OS (i.e. NonSysprepped, + SysprepRequested, SysprepApplied). Possible values include: + 'NonSysprepped', 'SysprepRequested', 'SysprepApplied' + :type windows_os_state: str or + ~azure.mgmt.devtestlabs.models.WindowsOsState + """ + + _attribute_map = { + 'windows_os_state': {'key': 'windowsOsState', 'type': 'str'}, + } + + def __init__(self, *, windows_os_state=None, **kwargs) -> None: + super(WindowsOsInfo, self).__init__(**kwargs) + self.windows_os_state = windows_os_state diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py index 4dcabbb44753..89d5496052a3 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/__init__.py @@ -29,6 +29,8 @@ from .disks_operations import DisksOperations from .environments_operations import EnvironmentsOperations from .secrets_operations import SecretsOperations +from .service_fabrics_operations import ServiceFabricsOperations +from .service_fabric_schedules_operations import ServiceFabricSchedulesOperations from .virtual_machines_operations import VirtualMachinesOperations from .virtual_machine_schedules_operations import VirtualMachineSchedulesOperations from .virtual_networks_operations import VirtualNetworksOperations @@ -54,6 +56,8 @@ 'DisksOperations', 'EnvironmentsOperations', 'SecretsOperations', + 'ServiceFabricsOperations', + 'ServiceFabricSchedulesOperations', 'VirtualMachinesOperations', 'VirtualMachineSchedulesOperations', 'VirtualNetworksOperations', diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py index f2302e344606..fd4567544366 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/arm_templates_operations.py @@ -23,7 +23,7 @@ class ArmTemplatesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -50,13 +50,14 @@ def list( :param expand: Specify the $expand query. Example: 'properties($select=displayName)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -72,7 +73,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/armtemplates' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -99,7 +100,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -108,9 +109,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -128,6 +128,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/armtemplates'} def get( self, resource_group_name, lab_name, artifact_source_name, name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -155,7 +156,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/armtemplates/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -173,7 +174,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -182,8 +183,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -200,3 +201,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/armtemplates/{name}'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py index 0efab778305e..67f75d5d6079 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifact_sources_operations.py @@ -23,7 +23,7 @@ class ArtifactSourcesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -48,13 +48,14 @@ def list( :param expand: Specify the $expand query. Example: 'properties($select=displayName)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -70,7 +71,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -96,7 +97,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -105,9 +106,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -125,6 +125,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources'} def get( self, resource_group_name, lab_name, name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -150,7 +151,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -167,7 +168,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -176,8 +177,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -194,6 +195,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}'} def create_or_update( self, resource_group_name, lab_name, name, artifact_source, custom_headers=None, raw=False, **operation_config): @@ -218,7 +220,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -233,6 +235,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -245,9 +248,8 @@ def create_or_update( body_content = self._serialize.body(artifact_source, 'ArtifactSource') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -266,6 +268,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}'} def delete( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): @@ -287,7 +290,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -302,7 +305,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -311,8 +313,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -322,6 +324,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}'} def update( self, resource_group_name, lab_name, name, artifact_source, custom_headers=None, raw=False, **operation_config): @@ -347,7 +350,7 @@ def update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -362,6 +365,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -374,9 +378,8 @@ def update( body_content = self._serialize.body(artifact_source, 'ArtifactSourceFragment') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -393,3 +396,4 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py index 4a549fbd8656..d036a6026f51 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/artifacts_operations.py @@ -23,7 +23,7 @@ class ArtifactsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -50,13 +50,14 @@ def list( :param expand: Specify the $expand query. Example: 'properties($select=title)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -72,7 +73,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -99,7 +100,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -108,9 +109,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -128,6 +128,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts'} def get( self, resource_group_name, lab_name, artifact_source_name, name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -155,7 +156,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -173,7 +174,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -182,8 +183,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -200,6 +201,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts/{name}'} def generate_arm_template( self, resource_group_name, lab_name, artifact_source_name, name, generate_arm_template_request, custom_headers=None, raw=False, **operation_config): @@ -229,7 +231,7 @@ def generate_arm_template( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts/{name}/generateArmTemplate' + url = self.generate_arm_template.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -245,6 +247,7 @@ def generate_arm_template( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -257,9 +260,8 @@ def generate_arm_template( body_content = self._serialize.body(generate_arm_template_request, 'GenerateArmTemplateRequest') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -276,3 +278,4 @@ def generate_arm_template( return client_raw_response return deserialized + generate_arm_template.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts/{name}/generateArmTemplate'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py index 2dc187524e2f..b63651cdcedc 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/costs_operations.py @@ -23,7 +23,7 @@ class CostsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -61,7 +61,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/costs/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -78,7 +78,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -87,8 +87,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -105,6 +105,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/costs/{name}'} def create_or_update( self, resource_group_name, lab_name, name, lab_cost, custom_headers=None, raw=False, **operation_config): @@ -129,7 +130,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/costs/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -144,6 +145,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -156,9 +158,8 @@ def create_or_update( body_content = self._serialize.body(lab_cost, 'LabCost') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -177,3 +178,4 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/costs/{name}'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py index 64520996f941..4471269a40a5 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_images_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -25,7 +25,7 @@ class CustomImagesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -50,13 +50,14 @@ def list( :param expand: Specify the $expand query. Example: 'properties($select=vm)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -72,7 +73,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -98,7 +99,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -107,9 +108,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -127,6 +127,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages'} def get( self, resource_group_name, lab_name, name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -152,7 +153,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -169,7 +170,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -178,8 +179,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -196,12 +197,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}'} def _create_or_update_initial( self, resource_group_name, lab_name, name, custom_image, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -216,6 +218,7 @@ def _create_or_update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -228,9 +231,8 @@ def _create_or_update_initial( body_content = self._serialize.body(custom_image, 'CustomImage') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -251,7 +253,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, lab_name, name, custom_image, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, name, custom_image, custom_headers=None, raw=False, polling=True, **operation_config): """Create or replace an existing custom image. This operation can take a while to complete. @@ -264,13 +266,16 @@ def create_or_update( :param custom_image: A custom image. :type custom_image: ~azure.mgmt.devtestlabs.models.CustomImage :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns CustomImage - or ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns CustomImage or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.devtestlabs.models.CustomImage] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.devtestlabs.models.CustomImage]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( @@ -282,30 +287,8 @@ def create_or_update( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - deserialized = self._deserialize('CustomImage', response) if raw: @@ -314,18 +297,20 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}'} def _delete_initial( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -340,7 +325,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -349,10 +333,10 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -362,7 +346,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, name, custom_headers=None, raw=False, polling=True, **operation_config): """Delete custom image. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -372,12 +356,14 @@ def delete( :param name: The name of the custom image. :type name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -388,37 +374,88 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}'} + + def update( + self, resource_group_name, lab_name, name, custom_image, custom_headers=None, raw=False, **operation_config): + """Modify properties of custom images. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param name: The name of the custom image. + :type name: str + :param custom_image: A custom image. + :type custom_image: ~azure.mgmt.devtestlabs.models.CustomImageFragment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CustomImage or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.devtestlabs.models.CustomImage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(custom_image, 'CustomImageFragment') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CustomImage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py index 159ff8838e6e..3fbe8eac7cb0 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/disks_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -25,7 +25,7 @@ class DisksOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -52,13 +52,14 @@ def list( :param expand: Specify the $expand query. Example: 'properties($select=diskType)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -74,7 +75,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -101,7 +102,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -110,9 +111,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -130,6 +130,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks'} def get( self, resource_group_name, lab_name, user_name, name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -157,7 +158,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -175,7 +176,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -184,8 +185,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -202,12 +203,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}'} def _create_or_update_initial( self, resource_group_name, lab_name, user_name, name, disk, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -223,6 +225,7 @@ def _create_or_update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -235,9 +238,8 @@ def _create_or_update_initial( body_content = self._serialize.body(disk, 'Disk') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -258,7 +260,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, lab_name, user_name, name, disk, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, user_name, name, disk, custom_headers=None, raw=False, polling=True, **operation_config): """Create or replace an existing disk. This operation can take a while to complete. @@ -273,13 +275,16 @@ def create_or_update( :param disk: A Disk. :type disk: ~azure.mgmt.devtestlabs.models.Disk :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Disk or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Disk or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.devtestlabs.models.Disk] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.devtestlabs.models.Disk]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( @@ -292,30 +297,8 @@ def create_or_update( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - deserialized = self._deserialize('Disk', response) if raw: @@ -324,18 +307,20 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}'} def _delete_initial( self, resource_group_name, lab_name, user_name, name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -351,7 +336,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -360,10 +344,10 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -373,7 +357,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, lab_name, user_name, name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, user_name, name, custom_headers=None, raw=False, polling=True, **operation_config): """Delete disk. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -385,12 +369,14 @@ def delete( :param name: The name of the disk. :type name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -402,40 +388,94 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}'} + + def update( + self, resource_group_name, lab_name, user_name, name, disk, custom_headers=None, raw=False, **operation_config): + """Modify properties of disks. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param name: The name of the disk. + :type name: str + :param disk: A Disk. + :type disk: ~azure.mgmt.devtestlabs.models.DiskFragment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Disk or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.devtestlabs.models.Disk or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'userName': self._serialize.url("user_name", user_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(disk, 'DiskFragment') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Disk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}'} def _attach_initial( @@ -443,7 +483,7 @@ def _attach_initial( attach_disk_properties = models.AttachDiskProperties(leased_by_lab_vm_id=leased_by_lab_vm_id) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}/attach' + url = self.attach.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -471,9 +511,8 @@ def _attach_initial( body_content = self._serialize.body(attach_disk_properties, 'AttachDiskProperties') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -485,7 +524,7 @@ def _attach_initial( return client_raw_response def attach( - self, resource_group_name, lab_name, user_name, name, leased_by_lab_vm_id=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, user_name, name, leased_by_lab_vm_id=None, custom_headers=None, raw=False, polling=True, **operation_config): """Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. @@ -501,12 +540,14 @@ def attach( to which the disk is attached. :type leased_by_lab_vm_id: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._attach_initial( @@ -519,40 +560,20 @@ def attach( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + attach.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}/attach'} def _detach_initial( @@ -560,7 +581,7 @@ def _detach_initial( detach_disk_properties = models.DetachDiskProperties(leased_by_lab_vm_id=leased_by_lab_vm_id) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}/detach' + url = self.detach.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -588,9 +609,8 @@ def _detach_initial( body_content = self._serialize.body(detach_disk_properties, 'DetachDiskProperties') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -602,7 +622,7 @@ def _detach_initial( return client_raw_response def detach( - self, resource_group_name, lab_name, user_name, name, leased_by_lab_vm_id=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, user_name, name, leased_by_lab_vm_id=None, custom_headers=None, raw=False, polling=True, **operation_config): """Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete. @@ -618,12 +638,14 @@ def detach( disk is attached. :type leased_by_lab_vm_id: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._detach_initial( @@ -636,37 +658,17 @@ def detach( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + detach.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}/detach'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py index 8a5c073b3f8f..61947381c66d 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/environments_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -25,7 +25,7 @@ class EnvironmentsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -52,13 +52,14 @@ def list( :param expand: Specify the $expand query. Example: 'properties($select=deploymentProperties)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -74,7 +75,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -101,7 +102,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -110,9 +111,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -130,6 +130,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments'} def get( self, resource_group_name, lab_name, user_name, name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -157,7 +158,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -175,7 +176,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -184,8 +185,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -202,12 +203,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments/{name}'} def _create_or_update_initial( self, resource_group_name, lab_name, user_name, name, dtl_environment, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -223,6 +225,7 @@ def _create_or_update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -235,9 +238,8 @@ def _create_or_update_initial( body_content = self._serialize.body(dtl_environment, 'DtlEnvironment') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -258,7 +260,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, lab_name, user_name, name, dtl_environment, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, user_name, name, dtl_environment, custom_headers=None, raw=False, polling=True, **operation_config): """Create or replace an existing environment. This operation can take a while to complete. @@ -274,13 +276,16 @@ def create_or_update( template deployment. :type dtl_environment: ~azure.mgmt.devtestlabs.models.DtlEnvironment :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns - DtlEnvironment or ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns DtlEnvironment or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.devtestlabs.models.DtlEnvironment] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.devtestlabs.models.DtlEnvironment]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( @@ -293,30 +298,8 @@ def create_or_update( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - deserialized = self._deserialize('DtlEnvironment', response) if raw: @@ -325,18 +308,20 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments/{name}'} def _delete_initial( self, resource_group_name, lab_name, user_name, name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments/{name}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -352,7 +337,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -361,10 +345,10 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -374,7 +358,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, lab_name, user_name, name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, user_name, name, custom_headers=None, raw=False, polling=True, **operation_config): """Delete environment. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -386,12 +370,14 @@ def delete( :param name: The name of the environment. :type name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -403,37 +389,93 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments/{name}'} + + def update( + self, resource_group_name, lab_name, user_name, name, dtl_environment, custom_headers=None, raw=False, **operation_config): + """Modify properties of environments. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param name: The name of the environment. + :type name: str + :param dtl_environment: An environment, which is essentially an ARM + template deployment. + :type dtl_environment: + ~azure.mgmt.devtestlabs.models.DtlEnvironmentFragment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DtlEnvironment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.devtestlabs.models.DtlEnvironment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'userName': self._serialize.url("user_name", user_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(dtl_environment, 'DtlEnvironmentFragment') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DtlEnvironment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments/{name}'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py index 5d17445b68a1..366a1a2a129e 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/formulas_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -25,7 +25,7 @@ class FormulasOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -50,13 +50,14 @@ def list( :param expand: Specify the $expand query. Example: 'properties($select=description)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -72,7 +73,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -98,7 +99,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -107,9 +108,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -127,6 +127,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas'} def get( self, resource_group_name, lab_name, name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -152,7 +153,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -169,7 +170,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -178,8 +179,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -196,12 +197,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas/{name}'} def _create_or_update_initial( self, resource_group_name, lab_name, name, formula, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -216,6 +218,7 @@ def _create_or_update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -228,9 +231,8 @@ def _create_or_update_initial( body_content = self._serialize.body(formula, 'Formula') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -251,7 +253,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, lab_name, name, formula, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, name, formula, custom_headers=None, raw=False, polling=True, **operation_config): """Create or replace an existing Formula. This operation can take a while to complete. @@ -265,13 +267,16 @@ def create_or_update( and other parameters :type formula: ~azure.mgmt.devtestlabs.models.Formula :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Formula or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Formula or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.devtestlabs.models.Formula] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.devtestlabs.models.Formula]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( @@ -283,30 +288,8 @@ def create_or_update( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - deserialized = self._deserialize('Formula', response) if raw: @@ -315,12 +298,14 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas/{name}'} def delete( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): @@ -342,7 +327,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas/{name}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -357,7 +342,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -366,8 +350,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -377,3 +361,76 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas/{name}'} + + def update( + self, resource_group_name, lab_name, name, formula, custom_headers=None, raw=False, **operation_config): + """Modify properties of formulas. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param name: The name of the formula. + :type name: str + :param formula: A formula for creating a VM, specifying an image base + and other parameters + :type formula: ~azure.mgmt.devtestlabs.models.FormulaFragment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Formula or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.devtestlabs.models.Formula or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(formula, 'FormulaFragment') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Formula', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas/{name}'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py index 9b81deac7401..849946066b15 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/gallery_images_operations.py @@ -23,7 +23,7 @@ class GalleryImagesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -48,13 +48,14 @@ def list( :param expand: Specify the $expand query. Example: 'properties($select=author)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -70,7 +71,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/galleryimages' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -96,7 +97,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -105,9 +106,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -125,3 +125,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/galleryimages'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py index ecc32deaf7d3..736efa3c0cea 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/global_schedules_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -25,7 +25,7 @@ class GlobalSchedulesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -46,13 +46,14 @@ def list_by_subscription( :param expand: Specify the $expand query. Example: 'properties($select=status)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -68,7 +69,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/schedules' + url = self.list_by_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -92,7 +93,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -101,9 +102,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -121,6 +121,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/schedules'} def list_by_resource_group( self, resource_group_name, expand=None, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): @@ -131,13 +132,14 @@ def list_by_resource_group( :param expand: Specify the $expand query. Example: 'properties($select=status)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -153,7 +155,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -178,7 +180,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -187,9 +189,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -207,6 +208,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules'} def get( self, resource_group_name, name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -230,7 +232,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -246,7 +248,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -255,8 +257,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -273,6 +275,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}'} def create_or_update( self, resource_group_name, name, schedule, custom_headers=None, raw=False, **operation_config): @@ -295,7 +298,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -309,6 +312,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -321,9 +325,8 @@ def create_or_update( body_content = self._serialize.body(schedule, 'Schedule') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -342,6 +345,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}'} def delete( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): @@ -361,7 +365,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -375,7 +379,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -384,8 +387,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -395,6 +398,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}'} def update( self, resource_group_name, name, schedule, custom_headers=None, raw=False, **operation_config): @@ -417,7 +421,7 @@ def update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -431,6 +435,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -443,9 +448,8 @@ def update( body_content = self._serialize.body(schedule, 'ScheduleFragment') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -462,12 +466,13 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}'} def _execute_initial( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}/execute' + url = self.execute.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -481,7 +486,6 @@ def _execute_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -490,8 +494,8 @@ def _execute_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -503,7 +507,7 @@ def _execute_initial( return client_raw_response def execute( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): """Execute a schedule. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -511,12 +515,14 @@ def execute( :param name: The name of the schedule. :type name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._execute_initial( @@ -526,40 +532,20 @@ def execute( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + execute.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}/execute'} def _retarget_initial( @@ -567,7 +553,7 @@ def _retarget_initial( retarget_schedule_properties = models.RetargetScheduleProperties(current_resource_id=current_resource_id, target_resource_id=target_resource_id) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}/retarget' + url = self.retarget.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -593,9 +579,8 @@ def _retarget_initial( body_content = self._serialize.body(retarget_schedule_properties, 'RetargetScheduleProperties') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -607,7 +592,7 @@ def _retarget_initial( return client_raw_response def retarget( - self, resource_group_name, name, current_resource_id=None, target_resource_id=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, current_resource_id=None, target_resource_id=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates a schedule's target resource Id. This operation can take a while to complete. @@ -622,12 +607,14 @@ def retarget( the schedule should be retargeted to :type target_resource_id: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._retarget_initial( @@ -639,37 +626,17 @@ def retarget( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + retarget.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}/retarget'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py index c3a86c0cdc1e..d6ce7c62635f 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/labs_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -25,7 +25,7 @@ class LabsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -46,13 +46,14 @@ def list_by_subscription( :param expand: Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -68,7 +69,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/labs' + url = self.list_by_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -92,7 +93,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -101,9 +102,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -121,6 +121,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/labs'} def list_by_resource_group( self, resource_group_name, expand=None, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): @@ -131,13 +132,14 @@ def list_by_resource_group( :param expand: Specify the $expand query. Example: 'properties($select=defaultStorageAccount)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -153,7 +155,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -178,7 +180,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -187,9 +189,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -207,6 +208,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs'} def get( self, resource_group_name, name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -230,7 +232,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -246,7 +248,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -255,8 +257,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -273,12 +275,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}'} def _create_or_update_initial( self, resource_group_name, name, lab, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -292,6 +295,7 @@ def _create_or_update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -304,9 +308,8 @@ def _create_or_update_initial( body_content = self._serialize.body(lab, 'Lab') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -327,7 +330,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, name, lab, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, lab, custom_headers=None, raw=False, polling=True, **operation_config): """Create or replace an existing lab. This operation can take a while to complete. @@ -338,13 +341,16 @@ def create_or_update( :param lab: A lab. :type lab: ~azure.mgmt.devtestlabs.models.Lab :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Lab or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Lab or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.devtestlabs.models.Lab] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.devtestlabs.models.Lab]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( @@ -355,30 +361,8 @@ def create_or_update( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - deserialized = self._deserialize('Lab', response) if raw: @@ -387,18 +371,20 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}'} def _delete_initial( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -412,7 +398,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -421,10 +406,10 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -434,7 +419,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): """Delete lab. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -442,12 +427,14 @@ def delete( :param name: The name of the lab. :type name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -457,40 +444,20 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}'} def update( self, resource_group_name, name, lab, custom_headers=None, raw=False, **operation_config): @@ -513,7 +480,7 @@ def update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -527,6 +494,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -539,9 +507,8 @@ def update( body_content = self._serialize.body(lab, 'LabFragment') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -558,12 +525,13 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}'} def _claim_any_vm_initial( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/claimAnyVm' + url = self.claim_any_vm.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -577,7 +545,6 @@ def _claim_any_vm_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -586,8 +553,8 @@ def _claim_any_vm_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -599,7 +566,7 @@ def _claim_any_vm_initial( return client_raw_response def claim_any_vm( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, custom_headers=None, raw=False, polling=True, **operation_config): """Claim a random claimable virtual machine in the lab. This operation can take a while to complete. @@ -608,12 +575,14 @@ def claim_any_vm( :param name: The name of the lab. :type name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._claim_any_vm_initial( @@ -623,46 +592,26 @@ def claim_any_vm( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + claim_any_vm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/claimAnyVm'} def _create_environment_initial( self, resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/createEnvironment' + url = self.create_environment.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -688,9 +637,8 @@ def _create_environment_initial( body_content = self._serialize.body(lab_virtual_machine_creation_parameter, 'LabVirtualMachineCreationParameter') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -702,7 +650,7 @@ def _create_environment_initial( return client_raw_response def create_environment( - self, resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, lab_virtual_machine_creation_parameter, custom_headers=None, raw=False, polling=True, **operation_config): """Create virtual machines in a lab. This operation can take a while to complete. @@ -715,12 +663,14 @@ def create_environment( :type lab_virtual_machine_creation_parameter: ~azure.mgmt.devtestlabs.models.LabVirtualMachineCreationParameter :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._create_environment_initial( @@ -731,40 +681,20 @@ def create_environment( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/createEnvironment'} def _export_resource_usage_initial( @@ -772,7 +702,7 @@ def _export_resource_usage_initial( export_resource_usage_parameters = models.ExportResourceUsageParameters(blob_storage_absolute_sas_uri=blob_storage_absolute_sas_uri, usage_start_date=usage_start_date) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/exportResourceUsage' + url = self.export_resource_usage.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -798,9 +728,8 @@ def _export_resource_usage_initial( body_content = self._serialize.body(export_resource_usage_parameters, 'ExportResourceUsageParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -812,7 +741,7 @@ def _export_resource_usage_initial( return client_raw_response def export_resource_usage( - self, resource_group_name, name, blob_storage_absolute_sas_uri=None, usage_start_date=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, blob_storage_absolute_sas_uri=None, usage_start_date=None, custom_headers=None, raw=False, polling=True, **operation_config): """Exports the lab resource usage into a storage account This operation can take a while to complete. @@ -828,12 +757,14 @@ def export_resource_usage( usage will be reported since the beginning of data collection. :type usage_start_date: datetime :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._export_resource_usage_initial( @@ -845,40 +776,20 @@ def export_resource_usage( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + export_resource_usage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/exportResourceUsage'} def generate_upload_uri( self, resource_group_name, name, blob_name=None, custom_headers=None, raw=False, **operation_config): @@ -903,7 +814,7 @@ def generate_upload_uri( generate_upload_uri_parameter = models.GenerateUploadUriParameter(blob_name=blob_name) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/generateUploadUri' + url = self.generate_upload_uri.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -917,6 +828,7 @@ def generate_upload_uri( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -929,9 +841,8 @@ def generate_upload_uri( body_content = self._serialize.body(generate_upload_uri_parameter, 'GenerateUploadUriParameter') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -948,6 +859,101 @@ def generate_upload_uri( return client_raw_response return deserialized + generate_upload_uri.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/generateUploadUri'} + + + def _import_virtual_machine_initial( + self, resource_group_name, name, source_virtual_machine_resource_id=None, destination_virtual_machine_name=None, custom_headers=None, raw=False, **operation_config): + import_lab_virtual_machine_request = models.ImportLabVirtualMachineRequest(source_virtual_machine_resource_id=source_virtual_machine_resource_id, destination_virtual_machine_name=destination_virtual_machine_name) + + # Construct URL + url = self.import_virtual_machine.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(import_lab_virtual_machine_request, 'ImportLabVirtualMachineRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def import_virtual_machine( + self, resource_group_name, name, source_virtual_machine_resource_id=None, destination_virtual_machine_name=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Import a virtual machine into a different lab. This operation can take + a while to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param name: The name of the lab. + :type name: str + :param source_virtual_machine_resource_id: The full resource ID of the + virtual machine to be imported. + :type source_virtual_machine_resource_id: str + :param destination_virtual_machine_name: The name of the virtual + machine in the destination lab + :type destination_virtual_machine_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._import_virtual_machine_initial( + resource_group_name=resource_group_name, + name=name, + source_virtual_machine_resource_id=source_virtual_machine_resource_id, + destination_virtual_machine_name=destination_virtual_machine_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + import_virtual_machine.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/importVirtualMachine'} def list_vhds( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): @@ -971,7 +977,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/listVhds' + url = self.list_vhds.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -989,7 +995,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -998,9 +1004,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1018,3 +1023,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_vhds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/listVhds'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py index ea6ee3eca323..5a5f16518eff 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py @@ -23,7 +23,7 @@ class NotificationChannelsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -48,13 +48,14 @@ def list( :param expand: Specify the $expand query. Example: 'properties($select=webHookUrl)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -70,7 +71,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -96,7 +97,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -105,9 +106,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -125,6 +125,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels'} def get( self, resource_group_name, lab_name, name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -150,7 +151,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -167,7 +168,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -176,8 +177,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -194,6 +195,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels/{name}'} def create_or_update( self, resource_group_name, lab_name, name, notification_channel, custom_headers=None, raw=False, **operation_config): @@ -219,7 +221,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -234,6 +236,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -246,9 +249,8 @@ def create_or_update( body_content = self._serialize.body(notification_channel, 'NotificationChannel') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -267,6 +269,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels/{name}'} def delete( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): @@ -288,7 +291,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels/{name}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -303,7 +306,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -312,8 +314,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -323,6 +325,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels/{name}'} def update( self, resource_group_name, lab_name, name, notification_channel, custom_headers=None, raw=False, **operation_config): @@ -348,7 +351,7 @@ def update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels/{name}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -363,6 +366,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -375,9 +379,8 @@ def update( body_content = self._serialize.body(notification_channel, 'NotificationChannelFragment') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -394,6 +397,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels/{name}'} def notify( self, resource_group_name, lab_name, name, event_name=None, json_payload=None, custom_headers=None, raw=False, **operation_config): @@ -423,7 +427,7 @@ def notify( notify_parameters = models.NotifyParameters(event_name=event_name, json_payload=json_payload) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels/{name}/notify' + url = self.notify.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -450,9 +454,8 @@ def notify( body_content = self._serialize.body(notify_parameters, 'NotifyParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -462,3 +465,4 @@ def notify( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + notify.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels/{name}/notify'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py index 9cd599a7ca99..2f0636e39f26 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/operations.py @@ -23,7 +23,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -56,7 +56,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/locations/{locationName}/operations/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'locationName': self._serialize.url("location_name", location_name, 'str'), @@ -70,7 +70,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -79,8 +79,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -97,3 +97,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/locations/{locationName}/operations/{name}'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py index 6d1ec76a9ba7..da02489f324b 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policies_operations.py @@ -23,7 +23,7 @@ class PoliciesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -50,13 +50,14 @@ def list( :param expand: Specify the $expand query. Example: 'properties($select=description)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -72,7 +73,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -99,7 +100,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -108,9 +109,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -128,6 +128,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies'} def get( self, resource_group_name, lab_name, policy_set_name, name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -155,7 +156,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -173,7 +174,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -182,8 +183,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -200,6 +201,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name}'} def create_or_update( self, resource_group_name, lab_name, policy_set_name, name, policy, custom_headers=None, raw=False, **operation_config): @@ -226,7 +228,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -242,6 +244,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -254,9 +257,8 @@ def create_or_update( body_content = self._serialize.body(policy, 'Policy') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -275,6 +277,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name}'} def delete( self, resource_group_name, lab_name, policy_set_name, name, custom_headers=None, raw=False, **operation_config): @@ -298,7 +301,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -314,7 +317,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -323,8 +325,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -334,6 +336,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name}'} def update( self, resource_group_name, lab_name, policy_set_name, name, policy, custom_headers=None, raw=False, **operation_config): @@ -360,7 +363,7 @@ def update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -376,6 +379,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -388,9 +392,8 @@ def update( body_content = self._serialize.body(policy, 'PolicyFragment') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -407,3 +410,4 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name}'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py index a1450f9077a2..ed602a5ba340 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/policy_sets_operations.py @@ -23,7 +23,7 @@ class PolicySetsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -63,7 +63,7 @@ def evaluate_policies( evaluate_policies_request = models.EvaluatePoliciesRequest(policies=policies) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{name}/evaluatePolicies' + url = self.evaluate_policies.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -78,6 +78,7 @@ def evaluate_policies( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -90,9 +91,8 @@ def evaluate_policies( body_content = self._serialize.body(evaluate_policies_request, 'EvaluatePoliciesRequest') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -109,3 +109,4 @@ def evaluate_policies( return client_raw_response return deserialized + evaluate_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{name}/evaluatePolicies'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py index d291564ae0a4..3597edb7fa87 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/provider_operations.py @@ -23,7 +23,7 @@ class ProviderOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -55,7 +55,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.DevTestLab/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -67,7 +67,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -76,9 +76,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -96,3 +95,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.DevTestLab/operations'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py index 8ae38018fafb..5f4e9429e3a1 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedules_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -25,7 +25,7 @@ class SchedulesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -50,13 +50,14 @@ def list( :param expand: Specify the $expand query. Example: 'properties($select=status)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -72,7 +73,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -98,7 +99,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -107,9 +108,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -127,6 +127,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules'} def get( self, resource_group_name, lab_name, name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -152,7 +153,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -169,7 +170,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -178,8 +179,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -196,6 +197,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}'} def create_or_update( self, resource_group_name, lab_name, name, schedule, custom_headers=None, raw=False, **operation_config): @@ -220,7 +222,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -235,6 +237,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -247,9 +250,8 @@ def create_or_update( body_content = self._serialize.body(schedule, 'Schedule') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -268,6 +270,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}'} def delete( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): @@ -289,7 +292,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -304,7 +307,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -313,8 +315,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -324,6 +326,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}'} def update( self, resource_group_name, lab_name, name, schedule, custom_headers=None, raw=False, **operation_config): @@ -348,7 +351,7 @@ def update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -363,6 +366,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -375,9 +379,8 @@ def update( body_content = self._serialize.body(schedule, 'ScheduleFragment') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -394,12 +397,13 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}'} def _execute_initial( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}/execute' + url = self.execute.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -414,7 +418,6 @@ def _execute_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -423,8 +426,8 @@ def _execute_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -436,7 +439,7 @@ def _execute_initial( return client_raw_response def execute( - self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, name, custom_headers=None, raw=False, polling=True, **operation_config): """Execute a schedule. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -446,12 +449,14 @@ def execute( :param name: The name of the schedule. :type name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._execute_initial( @@ -462,40 +467,20 @@ def execute( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + execute.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}/execute'} def list_applicable( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): @@ -521,7 +506,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}/listApplicable' + url = self.list_applicable.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -540,7 +525,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -549,9 +534,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -569,3 +553,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_applicable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}/listApplicable'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py index bdb83016aac4..46e2a62a2b88 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/secrets_operations.py @@ -12,6 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -23,7 +25,7 @@ class SecretsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -33,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -50,13 +52,14 @@ def list( :param expand: Specify the $expand query. Example: 'properties($select=value)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -72,7 +75,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -99,7 +102,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -108,9 +111,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -128,6 +130,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets'} def get( self, resource_group_name, lab_name, user_name, name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -155,7 +158,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -173,7 +176,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -182,8 +185,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -200,33 +203,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets/{name}'} - def create_or_update( - self, resource_group_name, lab_name, user_name, name, secret, custom_headers=None, raw=False, **operation_config): - """Create or replace an existing secret. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param lab_name: The name of the lab. - :type lab_name: str - :param user_name: The name of the user profile. - :type user_name: str - :param name: The name of the secret. - :type name: str - :param secret: A secret. - :type secret: ~azure.mgmt.devtestlabs.models.Secret - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Secret or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.devtestlabs.models.Secret or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _create_or_update_initial( + self, resource_group_name, lab_name, user_name, name, secret, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -242,6 +225,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -254,9 +238,8 @@ def create_or_update( body_content = self._serialize.body(secret, 'Secret') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -276,6 +259,63 @@ def create_or_update( return deserialized + def create_or_update( + self, resource_group_name, lab_name, user_name, name, secret, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or replace an existing secret. This operation can take a while + to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param name: The name of the secret. + :type name: str + :param secret: A secret. + :type secret: ~azure.mgmt.devtestlabs.models.Secret + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Secret or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.devtestlabs.models.Secret] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.devtestlabs.models.Secret]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + lab_name=lab_name, + user_name=user_name, + name=name, + secret=secret, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Secret', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets/{name}'} + def delete( self, resource_group_name, lab_name, user_name, name, custom_headers=None, raw=False, **operation_config): """Delete secret. @@ -298,7 +338,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets/{name}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -314,7 +354,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -323,8 +362,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -334,3 +373,82 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets/{name}'} + + def update( + self, resource_group_name, lab_name, user_name, name, tags=None, value=None, custom_headers=None, raw=False, **operation_config): + """Modify properties of secrets. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param name: The name of the secret. + :type name: str + :param tags: The tags of the resource. + :type tags: dict[str, str] + :param value: The value of the secret for secret creation. + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Secret or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.devtestlabs.models.Secret or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + secret = models.SecretFragment(tags=tags, value=value) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'userName': self._serialize.url("user_name", user_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(secret, 'SecretFragment') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Secret', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets/{name}'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py new file mode 100644 index 000000000000..892b9b3fb50b --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabric_schedules_operations.py @@ -0,0 +1,521 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ServiceFabricSchedulesOperations(object): + """ServiceFabricSchedulesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client API version. Constant value: "2018-09-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-15" + + self.config = config + + def list( + self, resource_group_name, lab_name, user_name, service_fabric_name, expand=None, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """List schedules in a given service fabric. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param service_fabric_name: The name of the service Fabric. + :type service_fabric_name: str + :param expand: Specify the $expand query. Example: + 'properties($select=status)' + :type expand: str + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') + :type filter: str + :param top: The maximum number of resources to return from the + operation. Example: '$top=10' + :type top: int + :param orderby: The ordering expression for the results, using OData + notation. Example: '$orderby=name desc' + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Schedule + :rtype: + ~azure.mgmt.devtestlabs.models.SchedulePaged[~azure.mgmt.devtestlabs.models.Schedule] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'userName': self._serialize.url("user_name", user_name, 'str'), + 'serviceFabricName': self._serialize.url("service_fabric_name", service_fabric_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.SchedulePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.SchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{serviceFabricName}/schedules'} + + def get( + self, resource_group_name, lab_name, user_name, service_fabric_name, name, expand=None, custom_headers=None, raw=False, **operation_config): + """Get schedule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param service_fabric_name: The name of the service Fabric. + :type service_fabric_name: str + :param name: The name of the schedule. + :type name: str + :param expand: Specify the $expand query. Example: + 'properties($select=status)' + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Schedule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.devtestlabs.models.Schedule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'userName': self._serialize.url("user_name", user_name, 'str'), + 'serviceFabricName': self._serialize.url("service_fabric_name", service_fabric_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Schedule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{serviceFabricName}/schedules/{name}'} + + def create_or_update( + self, resource_group_name, lab_name, user_name, service_fabric_name, name, schedule, custom_headers=None, raw=False, **operation_config): + """Create or replace an existing schedule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param service_fabric_name: The name of the service Fabric. + :type service_fabric_name: str + :param name: The name of the schedule. + :type name: str + :param schedule: A schedule. + :type schedule: ~azure.mgmt.devtestlabs.models.Schedule + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Schedule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.devtestlabs.models.Schedule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'userName': self._serialize.url("user_name", user_name, 'str'), + 'serviceFabricName': self._serialize.url("service_fabric_name", service_fabric_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(schedule, 'Schedule') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Schedule', response) + if response.status_code == 201: + deserialized = self._deserialize('Schedule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{serviceFabricName}/schedules/{name}'} + + def delete( + self, resource_group_name, lab_name, user_name, service_fabric_name, name, custom_headers=None, raw=False, **operation_config): + """Delete schedule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param service_fabric_name: The name of the service Fabric. + :type service_fabric_name: str + :param name: The name of the schedule. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'userName': self._serialize.url("user_name", user_name, 'str'), + 'serviceFabricName': self._serialize.url("service_fabric_name", service_fabric_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{serviceFabricName}/schedules/{name}'} + + def update( + self, resource_group_name, lab_name, user_name, service_fabric_name, name, schedule, custom_headers=None, raw=False, **operation_config): + """Modify properties of schedules. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param service_fabric_name: The name of the service Fabric. + :type service_fabric_name: str + :param name: The name of the schedule. + :type name: str + :param schedule: A schedule. + :type schedule: ~azure.mgmt.devtestlabs.models.ScheduleFragment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Schedule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.devtestlabs.models.Schedule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'userName': self._serialize.url("user_name", user_name, 'str'), + 'serviceFabricName': self._serialize.url("service_fabric_name", service_fabric_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(schedule, 'ScheduleFragment') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Schedule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{serviceFabricName}/schedules/{name}'} + + + def _execute_initial( + self, resource_group_name, lab_name, user_name, service_fabric_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.execute.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'userName': self._serialize.url("user_name", user_name, 'str'), + 'serviceFabricName': self._serialize.url("service_fabric_name", service_fabric_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def execute( + self, resource_group_name, lab_name, user_name, service_fabric_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """Execute a schedule. This operation can take a while to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param service_fabric_name: The name of the service Fabric. + :type service_fabric_name: str + :param name: The name of the schedule. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._execute_initial( + resource_group_name=resource_group_name, + lab_name=lab_name, + user_name=user_name, + service_fabric_name=service_fabric_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + execute.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{serviceFabricName}/schedules/{name}/execute'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py new file mode 100644 index 000000000000..076aa87a7963 --- /dev/null +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_fabrics_operations.py @@ -0,0 +1,721 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ServiceFabricsOperations(object): + """ServiceFabricsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client API version. Constant value: "2018-09-15". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-15" + + self.config = config + + def list( + self, resource_group_name, lab_name, user_name, expand=None, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """List service fabrics in a given user profile. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param expand: Specify the $expand query. Example: + 'properties($expand=applicableSchedule)' + :type expand: str + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') + :type filter: str + :param top: The maximum number of resources to return from the + operation. Example: '$top=10' + :type top: int + :param orderby: The ordering expression for the results, using OData + notation. Example: '$orderby=name desc' + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServiceFabric + :rtype: + ~azure.mgmt.devtestlabs.models.ServiceFabricPaged[~azure.mgmt.devtestlabs.models.ServiceFabric] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'userName': self._serialize.url("user_name", user_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ServiceFabricPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ServiceFabricPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics'} + + def get( + self, resource_group_name, lab_name, user_name, name, expand=None, custom_headers=None, raw=False, **operation_config): + """Get service fabric. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param name: The name of the service Fabric. + :type name: str + :param expand: Specify the $expand query. Example: + 'properties($expand=applicableSchedule)' + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceFabric or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.devtestlabs.models.ServiceFabric or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'userName': self._serialize.url("user_name", user_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServiceFabric', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{name}'} + + + def _create_or_update_initial( + self, resource_group_name, lab_name, user_name, name, service_fabric, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'userName': self._serialize.url("user_name", user_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service_fabric, 'ServiceFabric') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServiceFabric', response) + if response.status_code == 201: + deserialized = self._deserialize('ServiceFabric', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, lab_name, user_name, name, service_fabric, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or replace an existing Service Fabric. This operation can take a + while to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param name: The name of the service Fabric. + :type name: str + :param service_fabric: A Service Fabric. + :type service_fabric: ~azure.mgmt.devtestlabs.models.ServiceFabric + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ServiceFabric or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.devtestlabs.models.ServiceFabric] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.devtestlabs.models.ServiceFabric]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + lab_name=lab_name, + user_name=user_name, + name=name, + service_fabric=service_fabric, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ServiceFabric', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{name}'} + + + def _delete_initial( + self, resource_group_name, lab_name, user_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'userName': self._serialize.url("user_name", user_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, lab_name, user_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete service fabric. This operation can take a while to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param name: The name of the service Fabric. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + lab_name=lab_name, + user_name=user_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{name}'} + + def update( + self, resource_group_name, lab_name, user_name, name, service_fabric, custom_headers=None, raw=False, **operation_config): + """Modify properties of service fabrics. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param name: The name of the service Fabric. + :type name: str + :param service_fabric: A Service Fabric. + :type service_fabric: + ~azure.mgmt.devtestlabs.models.ServiceFabricFragment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceFabric or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.devtestlabs.models.ServiceFabric or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'userName': self._serialize.url("user_name", user_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service_fabric, 'ServiceFabricFragment') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServiceFabric', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{name}'} + + def list_applicable_schedules( + self, resource_group_name, lab_name, user_name, name, custom_headers=None, raw=False, **operation_config): + """Lists the applicable start/stop schedules, if any. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param name: The name of the service Fabric. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicableSchedule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.devtestlabs.models.ApplicableSchedule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_applicable_schedules.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'userName': self._serialize.url("user_name", user_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApplicableSchedule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_applicable_schedules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{name}/listApplicableSchedules'} + + + def _start_initial( + self, resource_group_name, lab_name, user_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'userName': self._serialize.url("user_name", user_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, lab_name, user_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """Start a service fabric. This operation can take a while to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param name: The name of the service Fabric. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + lab_name=lab_name, + user_name=user_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{name}/start'} + + + def _stop_initial( + self, resource_group_name, lab_name, user_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.stop.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'userName': self._serialize.url("user_name", user_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def stop( + self, resource_group_name, lab_name, user_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """Stop a service fabric This operation can take a while to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param user_name: The name of the user profile. + :type user_name: str + :param name: The name of the service Fabric. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + lab_name=lab_name, + user_name=user_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/servicefabrics/{name}/stop'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py index e7e83de4653b..83b4e9dae88c 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/service_runners_operations.py @@ -23,7 +23,7 @@ class ServiceRunnersOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -45,13 +45,14 @@ def list( :type resource_group_name: str :param lab_name: The name of the lab. :type lab_name: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -67,7 +68,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/servicerunners' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -91,7 +92,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -100,9 +101,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -120,6 +120,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/servicerunners'} def get( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): @@ -142,7 +143,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/servicerunners/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -157,7 +158,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -166,8 +167,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -184,6 +185,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/servicerunners/{name}'} def create_or_update( self, resource_group_name, lab_name, name, service_runner, custom_headers=None, raw=False, **operation_config): @@ -209,7 +211,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/servicerunners/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -224,6 +226,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -236,9 +239,8 @@ def create_or_update( body_content = self._serialize.body(service_runner, 'ServiceRunner') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -257,6 +259,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/servicerunners/{name}'} def delete( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): @@ -278,7 +281,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/servicerunners/{name}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -293,7 +296,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -302,8 +304,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -313,3 +315,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/servicerunners/{name}'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py index 3d0977cdb0fe..5f68155fece3 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/users_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -25,7 +25,7 @@ class UsersOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -50,13 +50,14 @@ def list( :param expand: Specify the $expand query. Example: 'properties($select=identity)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -72,7 +73,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -98,7 +99,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -107,9 +108,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -127,6 +127,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users'} def get( self, resource_group_name, lab_name, name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -152,7 +153,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -169,7 +170,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -178,8 +179,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -196,31 +197,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{name}'} - def create_or_update( - self, resource_group_name, lab_name, name, user, custom_headers=None, raw=False, **operation_config): - """Create or replace an existing user profile. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param lab_name: The name of the lab. - :type lab_name: str - :param name: The name of the user profile. - :type name: str - :param user: Profile of a lab user. - :type user: ~azure.mgmt.devtestlabs.models.User - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: User or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.devtestlabs.models.User or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _create_or_update_initial( + self, resource_group_name, lab_name, name, user, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -235,6 +218,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -247,9 +231,8 @@ def create_or_update( body_content = self._serialize.body(user, 'User') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -269,11 +252,65 @@ def create_or_update( return deserialized + def create_or_update( + self, resource_group_name, lab_name, name, user, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or replace an existing user profile. This operation can take a + while to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param name: The name of the user profile. + :type name: str + :param user: Profile of a lab user. + :type user: ~azure.mgmt.devtestlabs.models.User + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns User or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.devtestlabs.models.User] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.devtestlabs.models.User]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + lab_name=lab_name, + name=name, + user=user, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{name}'} + def _delete_initial( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{name}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -288,7 +325,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -297,10 +333,10 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -310,7 +346,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, name, custom_headers=None, raw=False, polling=True, **operation_config): """Delete user profile. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -320,12 +356,14 @@ def delete( :param name: The name of the user profile. :type name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -336,40 +374,20 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{name}'} def update( self, resource_group_name, lab_name, name, user, custom_headers=None, raw=False, **operation_config): @@ -394,7 +412,7 @@ def update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{name}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -409,6 +427,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -421,9 +440,8 @@ def update( body_content = self._serialize.body(user, 'UserFragment') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -440,3 +458,4 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{name}'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py index e68ced2b4bc9..dadb93a7e064 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machine_schedules_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -25,7 +25,7 @@ class VirtualMachineSchedulesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -52,13 +52,14 @@ def list( :param expand: Specify the $expand query. Example: 'properties($select=status)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -74,7 +75,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -101,7 +102,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -110,9 +111,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -130,6 +130,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules'} def get( self, resource_group_name, lab_name, virtual_machine_name, name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -157,7 +158,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -175,7 +176,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -184,8 +185,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -202,6 +203,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules/{name}'} def create_or_update( self, resource_group_name, lab_name, virtual_machine_name, name, schedule, custom_headers=None, raw=False, **operation_config): @@ -228,7 +230,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -244,6 +246,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -256,9 +259,8 @@ def create_or_update( body_content = self._serialize.body(schedule, 'Schedule') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -277,6 +279,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules/{name}'} def delete( self, resource_group_name, lab_name, virtual_machine_name, name, custom_headers=None, raw=False, **operation_config): @@ -300,7 +303,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules/{name}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -316,7 +319,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -325,8 +327,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -336,6 +338,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules/{name}'} def update( self, resource_group_name, lab_name, virtual_machine_name, name, schedule, custom_headers=None, raw=False, **operation_config): @@ -362,7 +365,7 @@ def update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules/{name}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -378,6 +381,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -390,9 +394,8 @@ def update( body_content = self._serialize.body(schedule, 'ScheduleFragment') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -409,12 +412,13 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules/{name}'} def _execute_initial( self, resource_group_name, lab_name, virtual_machine_name, name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules/{name}/execute' + url = self.execute.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -430,7 +434,6 @@ def _execute_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -439,8 +442,8 @@ def _execute_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -452,7 +455,7 @@ def _execute_initial( return client_raw_response def execute( - self, resource_group_name, lab_name, virtual_machine_name, name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, virtual_machine_name, name, custom_headers=None, raw=False, polling=True, **operation_config): """Execute a schedule. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -464,12 +467,14 @@ def execute( :param name: The name of the schedule. :type name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._execute_initial( @@ -481,37 +486,17 @@ def execute( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + execute.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{virtualMachineName}/schedules/{name}/execute'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py index b05ebe39236f..16c7762bfc04 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_machines_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -25,7 +25,7 @@ class VirtualMachinesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -50,13 +50,14 @@ def list( :param expand: Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -72,7 +73,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -98,7 +99,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -107,9 +108,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -127,6 +127,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines'} def get( self, resource_group_name, lab_name, name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -152,7 +153,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -169,7 +170,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -178,8 +179,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -196,12 +197,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}'} def _create_or_update_initial( self, resource_group_name, lab_name, name, lab_virtual_machine, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -216,6 +218,7 @@ def _create_or_update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -228,9 +231,8 @@ def _create_or_update_initial( body_content = self._serialize.body(lab_virtual_machine, 'LabVirtualMachine') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -251,7 +253,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, lab_name, name, lab_virtual_machine, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, name, lab_virtual_machine, custom_headers=None, raw=False, polling=True, **operation_config): """Create or replace an existing Virtual machine. This operation can take a while to complete. @@ -265,13 +267,16 @@ def create_or_update( :type lab_virtual_machine: ~azure.mgmt.devtestlabs.models.LabVirtualMachine :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns - LabVirtualMachine or ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns LabVirtualMachine or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.devtestlabs.models.LabVirtualMachine] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.devtestlabs.models.LabVirtualMachine]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( @@ -283,30 +288,8 @@ def create_or_update( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - deserialized = self._deserialize('LabVirtualMachine', response) if raw: @@ -315,18 +298,20 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}'} def _delete_initial( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -341,7 +326,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -350,10 +334,10 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -363,7 +347,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, name, custom_headers=None, raw=False, polling=True, **operation_config): """Delete virtual machine. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -373,12 +357,14 @@ def delete( :param name: The name of the virtual machine. :type name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -389,40 +375,20 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}'} def update( self, resource_group_name, lab_name, name, lab_virtual_machine, custom_headers=None, raw=False, **operation_config): @@ -448,7 +414,7 @@ def update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -463,6 +429,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -475,9 +442,8 @@ def update( body_content = self._serialize.body(lab_virtual_machine, 'LabVirtualMachineFragment') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -494,12 +460,13 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}'} def _add_data_disk_initial( self, resource_group_name, lab_name, name, data_disk_properties, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/addDataDisk' + url = self.add_data_disk.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -526,9 +493,8 @@ def _add_data_disk_initial( body_content = self._serialize.body(data_disk_properties, 'DataDiskProperties') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -540,7 +506,7 @@ def _add_data_disk_initial( return client_raw_response def add_data_disk( - self, resource_group_name, lab_name, name, data_disk_properties, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, name, data_disk_properties, custom_headers=None, raw=False, polling=True, **operation_config): """Attach a new or existing data disk to virtual machine. This operation can take a while to complete. @@ -555,12 +521,14 @@ def add_data_disk( :type data_disk_properties: ~azure.mgmt.devtestlabs.models.DataDiskProperties :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._add_data_disk_initial( @@ -572,40 +540,20 @@ def add_data_disk( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + add_data_disk.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/addDataDisk'} def _apply_artifacts_initial( @@ -613,7 +561,7 @@ def _apply_artifacts_initial( apply_artifacts_request = models.ApplyArtifactsRequest(artifacts=artifacts) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/applyArtifacts' + url = self.apply_artifacts.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -640,9 +588,8 @@ def _apply_artifacts_initial( body_content = self._serialize.body(apply_artifacts_request, 'ApplyArtifactsRequest') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -654,7 +601,7 @@ def _apply_artifacts_initial( return client_raw_response def apply_artifacts( - self, resource_group_name, lab_name, name, artifacts=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, name, artifacts=None, custom_headers=None, raw=False, polling=True, **operation_config): """Apply artifacts to virtual machine. This operation can take a while to complete. @@ -668,12 +615,14 @@ def apply_artifacts( :type artifacts: list[~azure.mgmt.devtestlabs.models.ArtifactInstallProperties] :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._apply_artifacts_initial( @@ -685,46 +634,26 @@ def apply_artifacts( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + apply_artifacts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/applyArtifacts'} def _claim_initial( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/claim' + url = self.claim.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -739,7 +668,6 @@ def _claim_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -748,8 +676,8 @@ def _claim_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -761,7 +689,7 @@ def _claim_initial( return client_raw_response def claim( - self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, name, custom_headers=None, raw=False, polling=True, **operation_config): """Take ownership of an existing virtual machine This operation can take a while to complete. @@ -772,12 +700,14 @@ def claim( :param name: The name of the virtual machine. :type name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._claim_initial( @@ -788,40 +718,20 @@ def claim( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + claim.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/claim'} def _detach_data_disk_initial( @@ -829,7 +739,7 @@ def _detach_data_disk_initial( detach_data_disk_properties = models.DetachDataDiskProperties(existing_lab_disk_id=existing_lab_disk_id) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/detachDataDisk' + url = self.detach_data_disk.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -856,9 +766,8 @@ def _detach_data_disk_initial( body_content = self._serialize.body(detach_data_disk_properties, 'DetachDataDiskProperties') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -870,7 +779,7 @@ def _detach_data_disk_initial( return client_raw_response def detach_data_disk( - self, resource_group_name, lab_name, name, existing_lab_disk_id=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, name, existing_lab_disk_id=None, custom_headers=None, raw=False, polling=True, **operation_config): """Detach the specified disk from the virtual machine. This operation can take a while to complete. @@ -884,12 +793,14 @@ def detach_data_disk( from virtual machine. :type existing_lab_disk_id: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._detach_data_disk_initial( @@ -901,44 +812,90 @@ def detach_data_disk( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + detach_data_disk.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/detachDataDisk'} + + def get_rdp_file_contents( + self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): + """Gets a string that represents the contents of the RDP file for the + virtual machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param name: The name of the virtual machine. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RdpConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.devtestlabs.models.RdpConnection or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_rdp_file_contents.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RdpConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_rdp_file_contents.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/getRdpFileContents'} def list_applicable_schedules( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): - """Lists all applicable schedules. + """Lists the applicable start/stop schedules, if any. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -957,7 +914,7 @@ def list_applicable_schedules( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/listApplicableSchedules' + url = self.list_applicable_schedules.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -972,7 +929,7 @@ def list_applicable_schedules( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -981,8 +938,8 @@ def list_applicable_schedules( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -999,12 +956,13 @@ def list_applicable_schedules( return client_raw_response return deserialized + list_applicable_schedules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/listApplicableSchedules'} - def _start_initial( + def _redeploy_initial( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/start' + url = self.redeploy.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -1019,7 +977,6 @@ def _start_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -1028,8 +985,8 @@ def _start_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -1040,9 +997,9 @@ def _start_initial( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def start( - self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): - """Start a virtual machine. This operation can take a while to complete. + def redeploy( + self, resource_group_name, lab_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """Redeploy a virtual machine This operation can take a while to complete. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -1051,15 +1008,17 @@ def start( :param name: The name of the virtual machine. :type name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ - raw_result = self._start_initial( + raw_result = self._redeploy_initial( resource_group_name=resource_group_name, lab_name=lab_name, name=name, @@ -1067,46 +1026,284 @@ def start( raw=True, **operation_config ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/redeploy'} + + + def _resize_initial( + self, resource_group_name, lab_name, name, size=None, custom_headers=None, raw=False, **operation_config): + resize_lab_virtual_machine_properties = models.ResizeLabVirtualMachineProperties(size=size) + + # Construct URL + url = self.resize.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(resize_lab_virtual_machine_properties, 'ResizeLabVirtualMachineProperties') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + if raw: - return raw_result + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def resize( + self, resource_group_name, lab_name, name, size=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Resize Virtual Machine. This operation can take a while to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param name: The name of the virtual machine. + :type name: str + :param size: Specifies the size of the virtual machine. + :type size: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._resize_initial( + resource_group_name=resource_group_name, + lab_name=lab_name, + name=name, + size=size, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + resize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/resize'} + + + def _restart_initial( + self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): - return raw_result.response + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - def get_long_running_status(status_link, headers=None): + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, lab_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """Restart a virtual machine. This operation can take a while to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param name: The name of the virtual machine. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + lab_name=lab_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/restart'} - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + def _start_initial( + self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, lab_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """Start a virtual machine. This operation can take a while to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param name: The name of the virtual machine. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + lab_name=lab_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/start'} def _stop_initial( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/stop' + url = self.stop.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -1121,7 +1318,6 @@ def _stop_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -1130,8 +1326,8 @@ def _stop_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -1143,7 +1339,7 @@ def _stop_initial( return client_raw_response def stop( - self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, name, custom_headers=None, raw=False, polling=True, **operation_config): """Stop a virtual machine This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -1153,12 +1349,14 @@ def stop( :param name: The name of the virtual machine. :type name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._stop_initial( @@ -1169,37 +1367,185 @@ def stop( raw=True, **operation_config ) - if raw: - return raw_result + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/stop'} + + + def _transfer_disks_initial( + self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.transfer_disks.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): - return raw_result.response + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - def get_long_running_status(status_link, headers=None): + def transfer_disks( + self, resource_group_name, lab_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """Transfers all data disks attached to the virtual machine to be owned by + the current user. This operation can take a while to complete. - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param name: The name of the virtual machine. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._transfer_disks_initial( + resource_group_name=resource_group_name, + lab_name=lab_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + transfer_disks.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/transferDisks'} + + + def _un_claim_initial( + self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.un_claim.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'labName': self._serialize.url("lab_name", lab_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def un_claim( + self, resource_group_name, lab_name, name, custom_headers=None, raw=False, polling=True, **operation_config): + """Release ownership of an existing virtual machine This operation can + take a while to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param lab_name: The name of the lab. + :type lab_name: str + :param name: The name of the virtual machine. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._un_claim_initial( + resource_group_name=resource_group_name, + lab_name=lab_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + un_claim.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/unClaim'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py index 6e013b161024..12ee56cd36ad 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/virtual_networks_operations.py @@ -12,8 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -25,7 +25,7 @@ class VirtualNetworksOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2016-05-15". + :ivar api_version: Client API version. Constant value: "2018-09-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-05-15" + self.api_version = "2018-09-15" self.config = config @@ -50,13 +50,14 @@ def list( :param expand: Specify the $expand query. Example: 'properties($expand=externalSubnets)' :type expand: str - :param filter: The filter to apply to the operation. + :param filter: The filter to apply to the operation. Example: + '$filter=contains(name,'myName') :type filter: str :param top: The maximum number of resources to return from the - operation. + operation. Example: '$top=10' :type top: int :param orderby: The ordering expression for the results, using OData - notation. + notation. Example: '$orderby=name desc' :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -72,7 +73,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -98,7 +99,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -107,9 +108,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -127,6 +127,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks'} def get( self, resource_group_name, lab_name, name, expand=None, custom_headers=None, raw=False, **operation_config): @@ -152,7 +153,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -169,7 +170,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -178,8 +179,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -196,12 +197,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}'} def _create_or_update_initial( self, resource_group_name, lab_name, name, virtual_network, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -216,6 +218,7 @@ def _create_or_update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -228,9 +231,8 @@ def _create_or_update_initial( body_content = self._serialize.body(virtual_network, 'VirtualNetwork') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -251,7 +253,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, lab_name, name, virtual_network, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, name, virtual_network, custom_headers=None, raw=False, polling=True, **operation_config): """Create or replace an existing virtual network. This operation can take a while to complete. @@ -264,13 +266,16 @@ def create_or_update( :param virtual_network: A virtual network. :type virtual_network: ~azure.mgmt.devtestlabs.models.VirtualNetwork :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns - VirtualNetwork or ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualNetwork or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.devtestlabs.models.VirtualNetwork] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.devtestlabs.models.VirtualNetwork]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( @@ -282,30 +287,8 @@ def create_or_update( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - deserialized = self._deserialize('VirtualNetwork', response) if raw: @@ -314,18 +297,20 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}'} def _delete_initial( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -340,7 +325,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -349,10 +333,10 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -362,7 +346,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, lab_name, name, custom_headers=None, raw=False, polling=True, **operation_config): """Delete virtual network. This operation can take a while to complete. :param resource_group_name: The name of the resource group. @@ -372,12 +356,14 @@ def delete( :param name: The name of the virtual network. :type name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -388,40 +374,20 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}'} def update( self, resource_group_name, lab_name, name, virtual_network, custom_headers=None, raw=False, **operation_config): @@ -447,7 +413,7 @@ def update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -462,6 +428,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -474,9 +441,8 @@ def update( body_content = self._serialize.body(virtual_network, 'VirtualNetworkFragment') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -493,3 +459,4 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}'} diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py index 1a46faeb7ce7..6a5bbb5effde 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2.2.0" +VERSION = "2018-09-15" From b5b48105f394a6db334cc5f320a7751624a7a1cd Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 27 Nov 2018 13:01:37 -0800 Subject: [PATCH 2/6] Generated from dc80cf49a2d04b807dd419fe80aca8d436cccd47 (#3856) typo: devtestlabs/resource-manager/Microsoft.DevTestLab/DTL - occured -> occurred - Reponse -> Response - seperated -> separated --- .../mgmt/devtestlabs/models/generate_upload_uri_response.py | 2 +- .../mgmt/devtestlabs/models/generate_upload_uri_response_py3.py | 2 +- .../azure/mgmt/devtestlabs/models/notification_channel.py | 2 +- .../mgmt/devtestlabs/models/notification_channel_fragment.py | 2 +- .../devtestlabs/models/notification_channel_fragment_py3.py | 2 +- .../azure/mgmt/devtestlabs/models/notification_channel_py3.py | 2 +- .../azure/mgmt/devtestlabs/models/notification_settings.py | 2 +- .../mgmt/devtestlabs/models/notification_settings_fragment.py | 2 +- .../devtestlabs/models/notification_settings_fragment_py3.py | 2 +- .../azure/mgmt/devtestlabs/models/notification_settings_py3.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py index 77855e03a546..6b89d3111051 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response.py @@ -13,7 +13,7 @@ class GenerateUploadUriResponse(Model): - """Reponse body for generating an upload URI. + """Response body for generating an upload URI. :param upload_uri: The upload URI for the VHD. :type upload_uri: str diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py index 933e7cedb40b..8807569409ac 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/generate_upload_uri_response_py3.py @@ -13,7 +13,7 @@ class GenerateUploadUriResponse(Model): - """Reponse body for generating an upload URI. + """Response body for generating an upload URI. :param upload_uri: The upload URI for the VHD. :type upload_uri: str diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py index 9f93dcb6a891..7132c4436c6e 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel.py @@ -31,7 +31,7 @@ class NotificationChannel(Resource): :param web_hook_url: The webhook URL to send notifications to. :type web_hook_url: str :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon seperated email addresses). + be a list of semi-colon separated email addresses). :type email_recipient: str :param notification_locale: The locale to use when sending a notification (fallback for unsupported languages is EN). diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py index 6a8748381026..588dee5b2395 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment.py @@ -20,7 +20,7 @@ class NotificationChannelFragment(UpdateResource): :param web_hook_url: The webhook URL to send notifications to. :type web_hook_url: str :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon seperated email addresses). + be a list of semi-colon separated email addresses). :type email_recipient: str :param notification_locale: The locale to use when sending a notification (fallback for unsupported languages is EN). diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py index 52e186582cca..a7179388c512 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_fragment_py3.py @@ -20,7 +20,7 @@ class NotificationChannelFragment(UpdateResource): :param web_hook_url: The webhook URL to send notifications to. :type web_hook_url: str :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon seperated email addresses). + be a list of semi-colon separated email addresses). :type email_recipient: str :param notification_locale: The locale to use when sending a notification (fallback for unsupported languages is EN). diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py index 081d126af337..08a0f47db1da 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_channel_py3.py @@ -31,7 +31,7 @@ class NotificationChannel(Resource): :param web_hook_url: The webhook URL to send notifications to. :type web_hook_url: str :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon seperated email addresses). + be a list of semi-colon separated email addresses). :type email_recipient: str :param notification_locale: The locale to use when sending a notification (fallback for unsupported languages is EN). diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py index 979023e5c506..656eae9f9cb4 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings.py @@ -25,7 +25,7 @@ class NotificationSettings(Model): sent. :type webhook_url: str :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon seperated email addresses). + be a list of semi-colon separated email addresses). :type email_recipient: str :param notification_locale: The locale to use when sending a notification (fallback for unsupported languages is EN). diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py index cee1c980e4c5..bc707e6ecfe7 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py @@ -25,7 +25,7 @@ class NotificationSettingsFragment(Model): sent. :type webhook_url: str :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon seperated email addresses). + be a list of semi-colon separated email addresses). :type email_recipient: str :param notification_locale: The locale to use when sending a notification (fallback for unsupported languages is EN). diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py index e7b7c6be8171..260ce034f89d 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment_py3.py @@ -25,7 +25,7 @@ class NotificationSettingsFragment(Model): sent. :type webhook_url: str :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon seperated email addresses). + be a list of semi-colon separated email addresses). :type email_recipient: str :param notification_locale: The locale to use when sending a notification (fallback for unsupported languages is EN). diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py index d4c3d6e90dda..66c77b99768a 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_py3.py @@ -25,7 +25,7 @@ class NotificationSettings(Model): sent. :type webhook_url: str :param email_recipient: The email recipient to send notifications to (can - be a list of semi-colon seperated email addresses). + be a list of semi-colon separated email addresses). :type email_recipient: str :param notification_locale: The locale to use when sending a notification (fallback for unsupported languages is EN). From 6c0db3eb74ec71334ce3d8cf22156a8af6ad05d3 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 3 Dec 2018 09:49:11 -0800 Subject: [PATCH 3/6] Generated from 64d9912a89570d7e419c816684747912ec618b10 (#3936) typo: Microsoft.DevTestLab - Reponse -> Response - notificationchannels -> notification channels - GibiBytes -> Gibibytes --- .../devtestlabs/models/attach_new_data_disk_options.py | 2 +- .../models/attach_new_data_disk_options_fragment.py | 2 +- .../models/attach_new_data_disk_options_fragment_py3.py | 2 +- .../models/attach_new_data_disk_options_py3.py | 2 +- .../azure/mgmt/devtestlabs/models/disk.py | 2 +- .../azure/mgmt/devtestlabs/models/disk_fragment.py | 2 +- .../azure/mgmt/devtestlabs/models/disk_fragment_py3.py | 2 +- .../azure/mgmt/devtestlabs/models/disk_py3.py | 2 +- .../operations/notification_channels_operations.py | 8 ++++---- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py index 4809eb43abb3..c4c18be9b277 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options.py @@ -15,7 +15,7 @@ class AttachNewDataDiskOptions(Model): """Properties to attach new disk to the Virtual Machine. - :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. :type disk_size_gi_b: int :param disk_name: The name of the disk to be attached. :type disk_name: str diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py index 763664dec3f3..4ab7695dd872 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment.py @@ -15,7 +15,7 @@ class AttachNewDataDiskOptionsFragment(Model): """Properties to attach new disk to the Virtual Machine. - :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. :type disk_size_gi_b: int :param disk_name: The name of the disk to be attached. :type disk_name: str diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py index 98ae37174525..ec8d6863f811 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_fragment_py3.py @@ -15,7 +15,7 @@ class AttachNewDataDiskOptionsFragment(Model): """Properties to attach new disk to the Virtual Machine. - :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. :type disk_size_gi_b: int :param disk_name: The name of the disk to be attached. :type disk_name: str diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py index 54e830630550..a03bb685e96c 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/attach_new_data_disk_options_py3.py @@ -15,7 +15,7 @@ class AttachNewDataDiskOptions(Model): """Properties to attach new disk to the Virtual Machine. - :param disk_size_gi_b: Size of the disk to be attached in GibiBytes. + :param disk_size_gi_b: Size of the disk to be attached in Gibibytes. :type disk_size_gi_b: int :param disk_name: The name of the disk to be attached. :type disk_name: str diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py index 25e4d966f51d..e61a526ec3f7 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk.py @@ -31,7 +31,7 @@ class Disk(Resource): :param disk_type: The storage type for the disk (i.e. Standard, Premium). Possible values include: 'Standard', 'Premium' :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in GibiBytes. + :param disk_size_gi_b: The size of the disk in Gibibytes. :type disk_size_gi_b: int :param leased_by_lab_vm_id: The resource ID of the VM to which this disk is leased. diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py index 95cf157219e5..fd351baa9716 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment.py @@ -20,7 +20,7 @@ class DiskFragment(UpdateResource): :param disk_type: The storage type for the disk (i.e. Standard, Premium). Possible values include: 'Standard', 'Premium' :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in GibiBytes. + :param disk_size_gi_b: The size of the disk in Gibibytes. :type disk_size_gi_b: int :param leased_by_lab_vm_id: The resource ID of the VM to which this disk is leased. diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py index 13c21baa5075..6becee37891a 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_fragment_py3.py @@ -20,7 +20,7 @@ class DiskFragment(UpdateResource): :param disk_type: The storage type for the disk (i.e. Standard, Premium). Possible values include: 'Standard', 'Premium' :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in GibiBytes. + :param disk_size_gi_b: The size of the disk in Gibibytes. :type disk_size_gi_b: int :param leased_by_lab_vm_id: The resource ID of the VM to which this disk is leased. diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py index 6bc04918d86e..5263a0668bcf 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/disk_py3.py @@ -31,7 +31,7 @@ class Disk(Resource): :param disk_type: The storage type for the disk (i.e. Standard, Premium). Possible values include: 'Standard', 'Premium' :type disk_type: str or ~azure.mgmt.devtestlabs.models.StorageType - :param disk_size_gi_b: The size of the disk in GibiBytes. + :param disk_size_gi_b: The size of the disk in Gibibytes. :type disk_size_gi_b: int :param leased_by_lab_vm_id: The resource ID of the VM to which this disk is leased. diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py index 5a5f16518eff..0c19dd07462e 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/notification_channels_operations.py @@ -39,7 +39,7 @@ def __init__(self, client, config, serializer, deserializer): def list( self, resource_group_name, lab_name, expand=None, filter=None, top=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """List notificationchannels in a given lab. + """List notification channels in a given lab. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -129,7 +129,7 @@ def internal_paging(next_link=None, raw=False): def get( self, resource_group_name, lab_name, name, expand=None, custom_headers=None, raw=False, **operation_config): - """Get notificationchannel. + """Get notification channel. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -273,7 +273,7 @@ def create_or_update( def delete( self, resource_group_name, lab_name, name, custom_headers=None, raw=False, **operation_config): - """Delete notificationchannel. + """Delete notification channel. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -329,7 +329,7 @@ def delete( def update( self, resource_group_name, lab_name, name, notification_channel, custom_headers=None, raw=False, **operation_config): - """Modify properties of notificationchannels. + """Modify properties of notification channels. :param resource_group_name: The name of the resource group. :type resource_group_name: str From 40a50c9e42604511ed7d0fdfcca6e792fbbfec94 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Thu, 7 Feb 2019 19:56:31 +0000 Subject: [PATCH 4/6] Packaging update of azure-mgmt-devtestlabs --- azure-mgmt-devtestlabs/README.rst | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/azure-mgmt-devtestlabs/README.rst b/azure-mgmt-devtestlabs/README.rst index 09b0c54db4db..df7a3ab18fab 100644 --- a/azure-mgmt-devtestlabs/README.rst +++ b/azure-mgmt-devtestlabs/README.rst @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see For a more complete set of Azure libraries, see the `azure `__ bundle package. -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - Usage ===== From d07e40b3de588fd9bb698a97a38f1105e8ce7011 Mon Sep 17 00:00:00 2001 From: Isabella Cai Date: Thu, 7 Feb 2019 12:20:35 -0800 Subject: [PATCH 5/6] updated versioning --- azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py index 6a5bbb5effde..7f225c6aab41 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py +++ b/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2018-09-15" +VERSION = "3.0.0" From 2025b19acb66b8d6b7ecc7cd7485ec5dd55e9ed2 Mon Sep 17 00:00:00 2001 From: Isabella Cai Date: Thu, 7 Feb 2019 14:36:47 -0800 Subject: [PATCH 6/6] re-recorded tests and edited changelog --- azure-mgmt-devtestlabs/HISTORY.rst | 109 +++++++++ ...est_mgmt_devtestlabs.test_devtestlabs.yaml | 214 +++++++++--------- 2 files changed, 218 insertions(+), 105 deletions(-) diff --git a/azure-mgmt-devtestlabs/HISTORY.rst b/azure-mgmt-devtestlabs/HISTORY.rst index 11d1fe3f2a28..ca00766f84e0 100644 --- a/azure-mgmt-devtestlabs/HISTORY.rst +++ b/azure-mgmt-devtestlabs/HISTORY.rst @@ -3,6 +3,115 @@ Release History =============== +3.0.0 (2019-02-07) +++++++++++++++++++ + +**Features** + +- Model NotificationChannel has a new parameter email_recipient +- Model NotificationChannel has a new parameter notification_locale +- Model ArtifactInstallProperties has a new parameter artifact_title +- Model GalleryImage has a new parameter plan_id +- Model GalleryImage has a new parameter is_plan_authorized +- Model EvaluatePoliciesProperties has a new parameter user_object_id +- Model ArtifactInstallPropertiesFragment has a new parameter artifact_title +- Model Lab has a new parameter announcement +- Model Lab has a new parameter support +- Model Lab has a new parameter load_balancer_id +- Model Lab has a new parameter mandatory_artifacts_resource_ids_linux +- Model Lab has a new parameter extended_properties +- Model Lab has a new parameter mandatory_artifacts_resource_ids_windows +- Model Lab has a new parameter vm_creation_resource_group +- Model Lab has a new parameter environment_permission +- Model Lab has a new parameter network_security_group_id +- Model Lab has a new parameter public_ip_id +- Model NotificationSettingsFragment has a new parameter email_recipient +- Model NotificationSettingsFragment has a new parameter notification_locale +- Model LabVirtualMachineCreationParameter has a new parameter schedule_parameters +- Model LabVirtualMachineCreationParameter has a new parameter compute_id +- Model LabVirtualMachineCreationParameter has a new parameter data_disk_parameters +- Model LabVirtualMachineCreationParameter has a new parameter last_known_power_state +- Model LabVirtualMachineCreationParameter has a new parameter plan_id +- Model ShutdownNotificationContent has a new parameter vm_url +- Model ShutdownNotificationContent has a new parameter minutes_until_shutdown +- Model NotificationSettings has a new parameter email_recipient +- Model NotificationSettings has a new parameter notification_locale +- Model LabVirtualMachine has a new parameter plan_id +- Model LabVirtualMachine has a new parameter schedule_parameters +- Model LabVirtualMachine has a new parameter last_known_power_state +- Model LabVirtualMachine has a new parameter data_disk_parameters +- Model ArmTemplate has a new parameter enabled +- Model CustomImage has a new parameter custom_image_plan +- Model CustomImage has a new parameter data_disk_storage_info +- Model CustomImage has a new parameter is_plan_authorized +- Model CustomImage has a new parameter managed_snapshot_id +- Model LabVirtualMachineFragment has a new parameter schedule_parameters +- Model LabVirtualMachineFragment has a new parameter compute_id +- Model LabVirtualMachineFragment has a new parameter data_disk_parameters +- Model LabVirtualMachineFragment has a new parameter last_known_power_state +- Model LabVirtualMachineFragment has a new parameter plan_id +- Added operation DisksOperations.update +- Added operation CustomImagesOperations.update +- Added operation LabsOperations.import_virtual_machine +- Added operation SecretsOperations.update +- Added operation EnvironmentsOperations.update +- Added operation FormulasOperations.update +- Added operation VirtualMachinesOperations.transfer_disks +- Added operation VirtualMachinesOperations.un_claim +- Added operation VirtualMachinesOperations.resize +- Added operation VirtualMachinesOperations.restart +- Added operation VirtualMachinesOperations.get_rdp_file_contents +- Added operation VirtualMachinesOperations.redeploy +- Added operation group ServiceFabricsOperations +- Added operation group ServiceFabricSchedulesOperations + +**Breaking changes** + +- Model VirtualNetworkFragment no longer has parameter type +- Model VirtualNetworkFragment no longer has parameter id +- Model VirtualNetworkFragment no longer has parameter location +- Model VirtualNetworkFragment no longer has parameter name +- Model VirtualNetworkFragment no longer has parameter external_subnets +- Model VirtualNetworkFragment no longer has parameter provisioning_state +- Model VirtualNetworkFragment no longer has parameter unique_identifier +- Model PolicyFragment no longer has parameter type +- Model PolicyFragment no longer has parameter id +- Model PolicyFragment no longer has parameter location +- Model PolicyFragment no longer has parameter name +- Model PolicyFragment no longer has parameter unique_identifier +- Model PolicyFragment no longer has parameter provisioning_state +- Model ArtifactSourceFragment no longer has parameter type +- Model ArtifactSourceFragment no longer has parameter id +- Model ArtifactSourceFragment no longer has parameter location +- Model ArtifactSourceFragment no longer has parameter name +- Model ArtifactSourceFragment no longer has parameter unique_identifier +- Model ArtifactSourceFragment no longer has parameter provisioning_state +- Model LabVirtualMachineCreationParameter no longer has parameter applicable_schedule +- Model LabVirtualMachineCreationParameter no longer has parameter compute_vm +- Model LabVirtualMachineCreationParameter no longer has parameter unique_identifier +- Model LabVirtualMachineCreationParameter no longer has parameter provisioning_state +- Model ApplicableScheduleFragment no longer has parameter location +- Model ApplicableScheduleFragment no longer has parameter type +- Model ApplicableScheduleFragment no longer has parameter id +- Model ApplicableScheduleFragment no longer has parameter name +- Model ScheduleFragment no longer has parameter type +- Model ScheduleFragment no longer has parameter id +- Model ScheduleFragment no longer has parameter location +- Model ScheduleFragment no longer has parameter name +- Model ScheduleFragment no longer has parameter unique_identifier +- Model ScheduleFragment no longer has parameter provisioning_state +- Model LabVirtualMachineFragment no longer has parameter type +- Model LabVirtualMachineFragment no longer has parameter id +- Model LabVirtualMachineFragment no longer has parameter compute_vm +- Model LabVirtualMachineFragment no longer has parameter location +- Model LabVirtualMachineFragment no longer has parameter name +- Model LabVirtualMachineFragment no longer has parameter unique_identifier +- Model LabVirtualMachineFragment no longer has parameter provisioning_state +- Model LabVirtualMachineFragment no longer has parameter applicable_schedule +- Model LabFragment has a new signature +- Model UserFragment has a new signature +- Model NotificationChannelFragment has a new signature + 2.2.0 (2018-02-15) ++++++++++++++++++ diff --git a/azure-mgmt-devtestlabs/tests/recordings/test_mgmt_devtestlabs.test_devtestlabs.yaml b/azure-mgmt-devtestlabs/tests/recordings/test_mgmt_devtestlabs.test_devtestlabs.yaml index f8dbcde867cb..f9fd3a6bddda 100644 --- a/azure-mgmt-devtestlabs/tests/recordings/test_mgmt_devtestlabs.test_devtestlabs.yaml +++ b/azure-mgmt-devtestlabs/tests/recordings/test_mgmt_devtestlabs.test_devtestlabs.yaml @@ -1,141 +1,145 @@ interactions: +- request: + body: '{"location": "westus"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.6 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.6.0 + azure-mgmt-devtestlabs/3.0.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.DevTestLab/labs/pylab34410fc3?api-version=2018-09-15 + response: + body: {string: '{"properties":{"labStorageType":"Premium","mandatoryArtifactsResourceIdsLinux":[],"mandatoryArtifactsResourceIdsWindows":[],"createdDate":"2019-02-07T22:33:28.7008726+00:00","premiumDataDisks":"Disabled","environmentPermission":"Reader","announcement":{"title":"","markdown":"","enabled":"Disabled","expired":false},"support":{"enabled":"Disabled","markdown":""},"provisioningState":"Creating","uniqueIdentifier":"66d57a8f-4302-4ee9-96b0-2876a7ef2f93"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/microsoft.devtestlab/labs/pylab34410fc3","name":"pylab34410fc3","type":"Microsoft.DevTestLab/labs","location":"westus"}'} + headers: + arr-disable-session-affinity: ['True'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevTestLab/locations/westus/operations/20190207-05fb374e-e8ce-45dc-b4e3-45ae6bc37a2a?api-version=2018-09-15'] + cache-control: [no-cache] + content-length: ['702'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 07 Feb 2019 22:33:28 GMT'] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:9e8cebda-9c88-460b-b55d-9410c4648f9a'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-dtl-processedby: ['https://dtl-highvol-rp.rp1.vsdth.visualstudio.com/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.DevTestLab/labs/pylab34410fc3?api-version=2018-09-15'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} - request: body: null headers: Accept: [application/json] - Accept-Charset: [utf-8] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python-requests/2.11.1] - client-request-id: [e4fcfe5f-f404-400b-81a0-ad274174e21c] - return-client-request-id: ['true'] - x-client-CPU: [x86] - x-client-OS: [win32] - x-client-SKU: [Python] - x-client-Ver: [0.4.3] + User-Agent: [python/3.6.6 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.6.0 + azure-mgmt-devtestlabs/3.0.0 Azure-SDK-For-Python] method: GET - uri: https:/login.microsoftonline.com/common/UserRealm/unittest%40myaddomain.onmicrosoft.com?api-version=1.0 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevTestLab/locations/westus/operations/20190207-05fb374e-e8ce-45dc-b4e3-45ae6bc37a2a?api-version=2018-09-15 response: - body: {string: '{"ver":"1.0","account_type":"Managed","domain_name":"myaddomain.onmicrosoft.com","cloud_instance_name":"microsoftonline.com"}'} + body: {string: '{"status":"Running"}'} headers: - Cache-Control: [private] - Content-Length: ['131'] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Dec 2016 23:47:07 GMT'] - P3P: [CP="DSP CUR OTPi IND OTRi ONL FIN"] - Server: [Microsoft-IIS/8.5] - Set-Cookie: [esctx=AQABAAAAAADRNYRQ3dhRSrm-4K-adpCJLK6ry33j8QHSHbuj8nrUG2HWMC8-kod_RtnUGsZL9SXoWYA9t0GAELYr4ppybhmtLDpZ01OSLpjXGiDyGNx4C5iYnqaaZhHvqYeeQGsVk4gLH8FVF0VeMD22JcTKCEGuZiuDVjzki2T__4CyatJ21SNstmvE0nZjHQe-icOCZwMgAA; - domain=.login.microsoftonline.com; path=/; secure; HttpOnly, x-ms-gateway-slice=corp; - path=/; secure; HttpOnly, stsservicecookie=ests; path=/; secure; HttpOnly] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - client-request-id: [e4fcfe5f-f404-400b-81a0-ad274174e21c] - x-ms-request-id: [450b0bdd-4947-40fa-bee6-a33dd1cb47ad] + arr-disable-session-affinity: ['True'] + cache-control: [no-cache] + content-length: ['20'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 07 Feb 2019 22:33:59 GMT'] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:9e8cebda-9c88-460b-b55d-9410c4648f9a'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + x-dtl-processedby: ['https://dtl-highvol-rp.rp1.vsdth.visualstudio.com/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d/providers/Microsoft.DevTestLab/locations/westus/operations/20190207-05fb374e-e8ce-45dc-b4e3-45ae6bc37a2a?api-version=2018-09-15'] status: {code: 200, message: OK} - request: - body: username=unittest%40myaddomain.onmicrosoft.com&scope=openid&resource=https%3A%2F%2Fmanagement.core.windows.net%2F&grant_type=password&client_id=04b07795-8ddb-461a-bbee-02f9e1bf7b46&password=R0ckNTe5T%21 + body: null headers: - Accept: ['*/*'] - Accept-Charset: [utf-8] + Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['208'] - User-Agent: [python-requests/2.11.1] - client-request-id: [e4fcfe5f-f404-400b-81a0-ad274174e21c] - content-type: [application/x-www-form-urlencoded] - return-client-request-id: ['true'] - x-client-CPU: [x86] - x-client-OS: [win32] - x-client-SKU: [Python] - x-client-Ver: [0.4.3] - method: POST - uri: https:/login.microsoftonline.com/common/oauth2/token?api-version=1.0 + User-Agent: [python/3.6.6 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.6.0 + azure-mgmt-devtestlabs/3.0.0 Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevTestLab/locations/westus/operations/20190207-05fb374e-e8ce-45dc-b4e3-45ae6bc37a2a?api-version=2018-09-15 response: - body: {string: '{"token_type":"Bearer","scope":"user_impersonation","expires_in":"3600","ext_expires_in":"10800","expires_on":"1481244429","not_before":"1481240529","resource":"https://management.core.windows.net/","access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlJyUXF1OXJ5ZEJWUldtY29jdVhVYjIwSEdSTSIsImtpZCI6IlJyUXF1OXJ5ZEJWUldtY29jdVhVYjIwSEdSTSJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC9kNjUwOWUwYy1jYTY0LTRlNWQtYWUyNC05MGE1YjdkMjc5ZTgvIiwiaWF0IjoxNDgxMjQwNTI5LCJuYmYiOjE0ODEyNDA1MjksImV4cCI6MTQ4MTI0NDQyOSwiYWNyIjoiMSIsImFtciI6WyJwd2QiXSwiYXBwaWQiOiIwNGIwNzc5NS04ZGRiLTQ2MWEtYmJlZS0wMmY5ZTFiZjdiNDYiLCJhcHBpZGFjciI6IjAiLCJlX2V4cCI6MTA4MDAsImZhbWlseV9uYW1lIjoiVGVzdHMiLCJnaXZlbl9uYW1lIjoiVW5pdCIsImdyb3VwcyI6WyIxM2VmMWY2NC01MTU3LTQ4MWMtYjQxYS1hMWNmZjkyNjAxZGIiXSwiaXBhZGRyIjoiMTY3LjIyMC4xLjE3MiIsIm5hbWUiOiJVbml0IFRlc3RzIiwib2lkIjoiZWQ5NWQ2Y2MtNmFkMy00MmJiLTgzNGUtODI2ZDFjN2RiNTQzIiwicGxhdGYiOiIxNCIsInB1aWQiOiIxMDAzMDAwMDk5N0NDQUU1Iiwic2NwIjoidXNlcl9pbXBlcnNvbmF0aW9uIiwic3ViIjoiVVdCdWdQb3BZM093Q3B5Vnk1SDU0VkNhZWhvaTVXZGhXckJKVHNQLXRVcyIsInRpZCI6ImQ2NTA5ZTBjLWNhNjQtNGU1ZC1hZTI0LTkwYTViN2QyNzllOCIsInVuaXF1ZV9uYW1lIjoidW5pdHRlc3RAcHR2c2F6dXJlb3V0bG9vay5vbm1pY3Jvc29mdC5jb20iLCJ1cG4iOiJ1bml0dGVzdEBwdHZzYXp1cmVvdXRsb29rLm9ubWljcm9zb2Z0LmNvbSIsInZlciI6IjEuMCIsIndpZHMiOlsiNjJlOTAzOTQtNjlmNS00MjM3LTkxOTAtMDEyMTc3MTQ1ZTEwIl19.cwUaI_nlH8gjPNfM_KX6_QJvahG0Wu_NXhEJavjZT2HsrHzoQIasCNaGuHchqj53sk9hbQ17486WiLXpdx1rzDJ2zz0ytziMjBrWuVmr2Y_iq_vo-4u4L0BRlXrhjlmzw3Gj6OKpTYN47aWHSXdlQe02NCFxUNtkqcOMLcoPscmyFyLGhLXVquCxoJzYvW9vuLYzea_PZDlvRd1vc0-jSizWILKAXUbZJ-NMUL5TaMBHTeiOf0ugfJQAkQo5Hhuuuc6r9IQgg2aHkaoApK6FjOPVMxn-bIIDcVhx3BFJkyaI61S0fgvcZGjaxywqzXGU135diiUTzgBIDc9newEqNA","refresh_token":"AQABAAAAAADRNYRQ3dhRSrm-4K-adpCJH9-5jCawt7F4LKj7SJUkYEzgscyIMEmBvy00gr1pZ-hfPwliliDdb5oofxZ2qUlegb3PXTFOJZsCc57Sml-wGmNWpehZo9-RsbXnuqEYLr6IufQDQUpezhxipdh6VFuTfm4crP_4YUgscYMUeCQTGnCjlKVQlNhiAgOzDqMRGOWDL3M7mMVdjl3jrotjKs4TkjSl5nYodiOfbbrTSN3wFlgjEitz27JR4BGSKXoWi5PAmwPihs0pZBjd0ez7H3C6mXc_PyGq1xGpepZvhqFCAyypoMWq11o6gwIVxR4k-kDt9sIm5mRhLM6-eRBNu9vX9tmhqN5Sk-X0ZHZLfN5nhrRUQe_eXG-VzEiLkD3zhlokntAlEy1mTm0f20jXzrYqCct6dbZIamkrnsNIMkmtKqWZy1haf6ULoeLrJtNPkF_wfePCH_77vdp61LksUwakLKPxfmOpmLJXpL8UgAa2jkYpSmiL_C9pcJDIZiuoER5OEmhGt66AI1JTCYwe9VX-tpm9oKlMYmuQfAqM24YVXtS_ReH54mGGCawKIdmJdSmxT5U_l5LNbyQcPlFrvxlDU1JrP-qvxw7DcjRcUz9YOhRW1_rR2ccQ3WnWbjqP_H1fBnAsqbqiuLliczphypJhIAA","id_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIn0.eyJhdWQiOiIwNGIwNzc5NS04ZGRiLTQ2MWEtYmJlZS0wMmY5ZTFiZjdiNDYiLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC9kNjUwOWUwYy1jYTY0LTRlNWQtYWUyNC05MGE1YjdkMjc5ZTgvIiwiaWF0IjoxNDgxMjQwNTI5LCJuYmYiOjE0ODEyNDA1MjksImV4cCI6MTQ4MTI0NDQyOSwiYW1yIjpbInB3ZCJdLCJmYW1pbHlfbmFtZSI6IlRlc3RzIiwiZ2l2ZW5fbmFtZSI6IlVuaXQiLCJpcGFkZHIiOiIxNjcuMjIwLjEuMTcyIiwibmFtZSI6IlVuaXQgVGVzdHMiLCJvaWQiOiJlZDk1ZDZjYy02YWQzLTQyYmItODM0ZS04MjZkMWM3ZGI1NDMiLCJwbGF0ZiI6IjE0Iiwic3ViIjoiZFNlSGJCQlhXOHNESEtJRjdVYWRqZjZsWDdFazZaSy1wdGJaQ3VNUHhkayIsInRpZCI6ImQ2NTA5ZTBjLWNhNjQtNGU1ZC1hZTI0LTkwYTViN2QyNzllOCIsInVuaXF1ZV9uYW1lIjoidW5pdHRlc3RAcHR2c2F6dXJlb3V0bG9vay5vbm1pY3Jvc29mdC5jb20iLCJ1cG4iOiJ1bml0dGVzdEBwdHZzYXp1cmVvdXRsb29rLm9ubWljcm9zb2Z0LmNvbSIsInZlciI6IjEuMCJ9."}'} + body: {string: '{"status":"Running"}'} headers: - Cache-Control: ['no-cache, no-store'] - Content-Length: ['3202'] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Dec 2016 23:47:08 GMT'] - Expires: ['-1'] - P3P: [CP="DSP CUR OTPi IND OTRi ONL FIN"] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Set-Cookie: [esctx=AQABAAAAAADRNYRQ3dhRSrm-4K-adpCJ0Uppm0fREVtVLGTW3OblGWsssWNL1asdrwC5CstF1Ol4wgRh-VIg68wxN_wD91WA0Pv9x9pBLmr-9zSwpHAqbdHC3yRqg8L1ldq4_bOnSdDHSShjjWV5Oy4I-1MuUJFZC6KT28wNgehjz2H3JzvuDHYBrMLx8H3FE-AHzo9f8YQgAA; - domain=.login.microsoftonline.com; path=/; secure; HttpOnly, x-ms-gateway-slice=corp; - path=/; secure; HttpOnly, stsservicecookie=ests; path=/; secure; HttpOnly] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - client-request-id: [e4fcfe5f-f404-400b-81a0-ad274174e21c] - x-ms-request-id: [18efa29a-2f58-4bb1-b4b3-d2212250f1e2] + arr-disable-session-affinity: ['True'] + cache-control: [no-cache] + content-length: ['20'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 07 Feb 2019 22:34:30 GMT'] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:9e8cebda-9c88-460b-b55d-9410c4648f9a'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + x-dtl-processedby: ['https://dtl-highvol-rp.rp1.vsdth.visualstudio.com/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d/providers/Microsoft.DevTestLab/locations/westus/operations/20190207-05fb374e-e8ce-45dc-b4e3-45ae6bc37a2a?api-version=2018-09-15'] status: {code: 200, message: OK} - request: - body: '{"location": "westus"}' + body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['22'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.11.1 msrest/0.4.4 - msrest_azure/0.4.5 devtestlabsclient/1.0.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [a1c7b50a-bda0-11e6-9d0d-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.DevTestLab/labs/pylab34410fc3?api-version=2016-05-15 + User-Agent: [python/3.6.6 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.6.0 + azure-mgmt-devtestlabs/3.0.0 Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevTestLab/locations/westus/operations/20190207-05fb374e-e8ce-45dc-b4e3-45ae6bc37a2a?api-version=2018-09-15 response: - body: {string: '{"properties":{"vaultName":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.KeyVault/vaults/pylab34410fc34690","labStorageType":"Premium","createdDate":"2016-12-06T17:47:09.1714421+00:00","premiumDataDisks":"Disabled","provisioningState":"Succeeded","uniqueIdentifier":"06866a64-8a02-45d6-be57-de26110121d3"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/microsoft.devtestlab/labs/pylab34410fc3","name":"pylab34410fc3","type":"Microsoft.DevTestLab/labs","location":"westus"}'} + body: {string: '{"status":"Succeeded"}'} headers: - Cache-Control: [no-cache] - Content-Length: ['644'] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Dec 2016 23:47:09 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-AspNet-Version: [4.0.30319] - X-Powered-By: [ASP.NET] - x-ms-correlation-request-id: [49544d55-b44c-47d6-b690-03024ec14781] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [49544d55-b44c-47d6-b690-03024ec14781] - x-ms-routing-request-id: ['CENTRALUS:20161208T234710Z:49544d55-b44c-47d6-b690-03024ec14781'] - x-rp-requesturi: ['https://westus.rp1.vsdth.visualstudio.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.DevTestLab/labs/pylab34410fc3?api-version=2016-05-15'] - status: {code: 201, message: Created} + arr-disable-session-affinity: ['True'] + cache-control: [no-cache] + content-length: ['22'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 07 Feb 2019 22:35:00 GMT'] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:9e8cebda-9c88-460b-b55d-9410c4648f9a'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + x-dtl-processedby: ['https://dtl-highvol-rp.rp1.vsdth.visualstudio.com/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d/providers/Microsoft.DevTestLab/locations/westus/operations/20190207-05fb374e-e8ce-45dc-b4e3-45ae6bc37a2a?api-version=2018-09-15'] + status: {code: 200, message: OK} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.11.1 msrest/0.4.4 - msrest_azure/0.4.5 devtestlabsclient/1.0.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [a1c7b50a-bda0-11e6-9d0d-ecb1d756380e] + User-Agent: [python/3.6.6 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.6.0 + azure-mgmt-devtestlabs/3.0.0 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.DevTestLab/labs/pylab34410fc3?api-version=2016-05-15 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.DevTestLab/labs/pylab34410fc3?api-version=2018-09-15 response: - body: {string: '{"properties":{"defaultStorageAccount":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.Storage/storageAccounts/dpylab34410fc38748","defaultPremiumStorageAccount":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.Storage/storageAccounts/dppylab34410fc35851","artifactsStorageAccount":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.Storage/storageAccounts/apylab34410fc33911","vaultName":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.KeyVault/vaults/pylab34410fc34690","labStorageType":"Premium","createdDate":"2016-12-06T17:47:09.1714421+00:00","premiumDataDisks":"Disabled","provisioningState":"Succeeded","uniqueIdentifier":"06866a64-8a02-45d6-be57-de26110121d3"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/microsoft.devtestlab/labs/pylab34410fc3","name":"pylab34410fc3","type":"Microsoft.DevTestLab/labs","location":"westus"}'} + body: {string: '{"properties":{"defaultStorageAccount":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.Storage/storageAccounts/apylab34410fc39961","defaultPremiumStorageAccount":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.Storage/storageAccounts/apylab34410fc39961","artifactsStorageAccount":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.Storage/storageAccounts/apylab34410fc39961","premiumDataDiskStorageAccount":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.Storage/storageAccounts/apylab34410fc39961","vaultName":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.KeyVault/vaults/pylab34410fc37265","labStorageType":"Premium","mandatoryArtifactsResourceIdsLinux":[],"mandatoryArtifactsResourceIdsWindows":[],"createdDate":"2019-02-07T22:33:28.7008726+00:00","premiumDataDisks":"Disabled","environmentPermission":"Reader","announcement":{"title":"","markdown":"","enabled":"Disabled","expired":false},"support":{"enabled":"Disabled","markdown":""},"provisioningState":"Succeeded","uniqueIdentifier":"66d57a8f-4302-4ee9-96b0-2876a7ef2f93"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/microsoft.devtestlab/labs/pylab34410fc3","name":"pylab34410fc3","type":"Microsoft.DevTestLab/labs","location":"westus"}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Dec 2016 23:47:10 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: ['Accept-Encoding,Accept-Encoding'] - X-AspNet-Version: [4.0.30319] - X-Powered-By: [ASP.NET] - content-length: ['1263'] - x-ms-correlation-request-id: [7dc7e4da-6709-45ff-b10b-5b157e3eec53] - x-ms-ratelimit-remaining-subscription-reads: ['14993'] - x-ms-request-id: [7dc7e4da-6709-45ff-b10b-5b157e3eec53] - x-ms-routing-request-id: ['CENTRALUS:20161208T234711Z:7dc7e4da-6709-45ff-b10b-5b157e3eec53'] - x-rp-requesturi: ['https://westus.rp1.vsdth.visualstudio.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.DevTestLab/labs/pylab34410fc3?api-version=2016-05-15'] + arr-disable-session-affinity: ['True'] + cache-control: [no-cache] + content-length: ['1714'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 07 Feb 2019 22:35:00 GMT'] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:9e8cebda-9c88-460b-b55d-9410c4648f9a'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + x-dtl-processedby: ['https://dtl-highvol-rp.rp1.vsdth.visualstudio.com/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.DevTestLab/labs/pylab34410fc3?api-version=2018-09-15'] status: {code: 200, message: OK} version: 1