azure_mgmt_web 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/LICENSE.txt +21 -0
- data/Rakefile +5 -0
- data/azure_mgmt_web.gemspec +35 -0
- data/lib/azure_mgmt_web.rb +236 -0
- data/lib/azure_mgmt_web/certificates.rb +693 -0
- data/lib/azure_mgmt_web/classic_mobile_services.rb +208 -0
- data/lib/azure_mgmt_web/domains.rb +459 -0
- data/lib/azure_mgmt_web/global.rb +793 -0
- data/lib/azure_mgmt_web/global_domain_registration.rb +351 -0
- data/lib/azure_mgmt_web/global_resource_groups.rb +91 -0
- data/lib/azure_mgmt_web/hosting_environments.rb +2629 -0
- data/lib/azure_mgmt_web/managed_hosting_environments.rb +652 -0
- data/lib/azure_mgmt_web/models/access_control_entry_action.rb +16 -0
- data/lib/azure_mgmt_web/models/address.rb +101 -0
- data/lib/azure_mgmt_web/models/address_response.rb +105 -0
- data/lib/azure_mgmt_web/models/api_definition_info.rb +56 -0
- data/lib/azure_mgmt_web/models/application_logs_config.rb +97 -0
- data/lib/azure_mgmt_web/models/arm_plan.rb +92 -0
- data/lib/azure_mgmt_web/models/auto_heal_action_type.rb +17 -0
- data/lib/azure_mgmt_web/models/auto_heal_actions.rb +89 -0
- data/lib/azure_mgmt_web/models/auto_heal_custom_action.rb +66 -0
- data/lib/azure_mgmt_web/models/auto_heal_rules.rb +80 -0
- data/lib/azure_mgmt_web/models/auto_heal_triggers.rb +122 -0
- data/lib/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb +82 -0
- data/lib/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb +78 -0
- data/lib/azure_mgmt_web/models/azure_resource_type.rb +16 -0
- data/lib/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb +70 -0
- data/lib/azure_mgmt_web/models/backup_item.rb +92 -0
- data/lib/azure_mgmt_web/models/backup_item_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/backup_item_properties.rb +215 -0
- data/lib/azure_mgmt_web/models/backup_item_status.rb +24 -0
- data/lib/azure_mgmt_web/models/backup_request.rb +92 -0
- data/lib/azure_mgmt_web/models/backup_request_properties.rb +136 -0
- data/lib/azure_mgmt_web/models/backup_restore_operation_type.rb +17 -0
- data/lib/azure_mgmt_web/models/backup_schedule.rb +118 -0
- data/lib/azure_mgmt_web/models/built_in_authentication_provider.rb +19 -0
- data/lib/azure_mgmt_web/models/certificate.rb +92 -0
- data/lib/azure_mgmt_web/models/certificate_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/certificate_properties.rb +194 -0
- data/lib/azure_mgmt_web/models/channels.rb +18 -0
- data/lib/azure_mgmt_web/models/classic_mobile_service.rb +92 -0
- data/lib/azure_mgmt_web/models/classic_mobile_service_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/classic_mobile_service_properties.rb +56 -0
- data/lib/azure_mgmt_web/models/clone_ability_result.rb +17 -0
- data/lib/azure_mgmt_web/models/cloning_info.rb +152 -0
- data/lib/azure_mgmt_web/models/compute_mode_options.rb +16 -0
- data/lib/azure_mgmt_web/models/conn_string_info.rb +79 -0
- data/lib/azure_mgmt_web/models/conn_string_value_type_pair.rb +70 -0
- data/lib/azure_mgmt_web/models/connection_string_dictionary.rb +102 -0
- data/lib/azure_mgmt_web/models/contact.rb +136 -0
- data/lib/azure_mgmt_web/models/cors_settings.rb +59 -0
- data/lib/azure_mgmt_web/models/csm_move_resource_envelope.rb +66 -0
- data/lib/azure_mgmt_web/models/csm_publishing_profile_options.rb +59 -0
- data/lib/azure_mgmt_web/models/csm_site_recovery_entity.rb +80 -0
- data/lib/azure_mgmt_web/models/csm_slot_entity.rb +67 -0
- data/lib/azure_mgmt_web/models/csm_usage_quota.rb +102 -0
- data/lib/azure_mgmt_web/models/csm_usage_quota_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/csr.rb +92 -0
- data/lib/azure_mgmt_web/models/csr_properties.rb +110 -0
- data/lib/azure_mgmt_web/models/custom_host_name_dns_record_type.rb +16 -0
- data/lib/azure_mgmt_web/models/database_backup_setting.rb +91 -0
- data/lib/azure_mgmt_web/models/database_server_type.rb +18 -0
- data/lib/azure_mgmt_web/models/deleted_site.rb +92 -0
- data/lib/azure_mgmt_web/models/deleted_site_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/deleted_site_properties.rb +365 -0
- data/lib/azure_mgmt_web/models/deployment.rb +92 -0
- data/lib/azure_mgmt_web/models/deployment_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/deployment_properties.rb +142 -0
- data/lib/azure_mgmt_web/models/domain.rb +92 -0
- data/lib/azure_mgmt_web/models/domain_availablility_check_result.rb +79 -0
- data/lib/azure_mgmt_web/models/domain_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/domain_control_center_sso_request.rb +75 -0
- data/lib/azure_mgmt_web/models/domain_properties.rb +262 -0
- data/lib/azure_mgmt_web/models/domain_purchase_consent.rb +79 -0
- data/lib/azure_mgmt_web/models/domain_recommendation_search_parameters.rb +67 -0
- data/lib/azure_mgmt_web/models/domain_registration_input.rb +92 -0
- data/lib/azure_mgmt_web/models/domain_registration_input_properties.rb +271 -0
- data/lib/azure_mgmt_web/models/domain_status.rb +35 -0
- data/lib/azure_mgmt_web/models/domain_type.rb +16 -0
- data/lib/azure_mgmt_web/models/enabled_config.rb +56 -0
- data/lib/azure_mgmt_web/models/experiments.rb +77 -0
- data/lib/azure_mgmt_web/models/file_system_application_logs_config.rb +60 -0
- data/lib/azure_mgmt_web/models/file_system_http_logs_config.rb +82 -0
- data/lib/azure_mgmt_web/models/frequency_unit.rb +16 -0
- data/lib/azure_mgmt_web/models/geo_region.rb +92 -0
- data/lib/azure_mgmt_web/models/geo_region_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/geo_region_properties.rb +74 -0
- data/lib/azure_mgmt_web/models/handler_mapping.rb +79 -0
- data/lib/azure_mgmt_web/models/host_name.rb +120 -0
- data/lib/azure_mgmt_web/models/host_name_binding.rb +92 -0
- data/lib/azure_mgmt_web/models/host_name_binding_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/host_name_binding_properties.rb +124 -0
- data/lib/azure_mgmt_web/models/host_name_ssl_state.rb +98 -0
- data/lib/azure_mgmt_web/models/host_name_type.rb +16 -0
- data/lib/azure_mgmt_web/models/hosting_environment.rb +92 -0
- data/lib/azure_mgmt_web/models/hosting_environment_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/hosting_environment_diagnostics.rb +65 -0
- data/lib/azure_mgmt_web/models/hosting_environment_profile.rb +78 -0
- data/lib/azure_mgmt_web/models/hosting_environment_properties.rb +452 -0
- data/lib/azure_mgmt_web/models/hosting_environment_status.rb +18 -0
- data/lib/azure_mgmt_web/models/http_logs_config.rb +80 -0
- data/lib/azure_mgmt_web/models/internal_load_balancing_mode.rb +17 -0
- data/lib/azure_mgmt_web/models/key_value_pair_string_string.rb +65 -0
- data/lib/azure_mgmt_web/models/localizable_string.rb +65 -0
- data/lib/azure_mgmt_web/models/log_level.rb +19 -0
- data/lib/azure_mgmt_web/models/managed_hosting_environment.rb +92 -0
- data/lib/azure_mgmt_web/models/managed_hosting_environment_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/managed_hosting_environment_properties.rb +179 -0
- data/lib/azure_mgmt_web/models/managed_hosting_environment_status.rb +17 -0
- data/lib/azure_mgmt_web/models/managed_pipeline_mode.rb +16 -0
- data/lib/azure_mgmt_web/models/metric_availabilily.rb +66 -0
- data/lib/azure_mgmt_web/models/metric_definition.rb +92 -0
- data/lib/azure_mgmt_web/models/metric_definition_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/metric_definition_properties.rb +113 -0
- data/lib/azure_mgmt_web/models/name_identifier.rb +56 -0
- data/lib/azure_mgmt_web/models/name_identifier_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/name_value_pair.rb +65 -0
- data/lib/azure_mgmt_web/models/network_access_control_entry.rb +88 -0
- data/lib/azure_mgmt_web/models/network_features.rb +94 -0
- data/lib/azure_mgmt_web/models/network_features_properties.rb +102 -0
- data/lib/azure_mgmt_web/models/notification_level.rb +18 -0
- data/lib/azure_mgmt_web/models/premier_add_on_request.rb +107 -0
- data/lib/azure_mgmt_web/models/provisioning_state.rb +19 -0
- data/lib/azure_mgmt_web/models/ramp_up_rule.rb +147 -0
- data/lib/azure_mgmt_web/models/recommendation.rb +210 -0
- data/lib/azure_mgmt_web/models/recommendation_rule.rb +146 -0
- data/lib/azure_mgmt_web/models/relay_service_connection_entity.rb +92 -0
- data/lib/azure_mgmt_web/models/relay_service_connection_entity_properties.rb +111 -0
- data/lib/azure_mgmt_web/models/requests_based_trigger.rb +66 -0
- data/lib/azure_mgmt_web/models/resource_metric.rb +171 -0
- data/lib/azure_mgmt_web/models/resource_metric_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/resource_metric_name.rb +65 -0
- data/lib/azure_mgmt_web/models/resource_metric_value.rb +106 -0
- data/lib/azure_mgmt_web/models/resource_name_availability.rb +78 -0
- data/lib/azure_mgmt_web/models/resource_name_availability_request.rb +74 -0
- data/lib/azure_mgmt_web/models/restore_request.rb +92 -0
- data/lib/azure_mgmt_web/models/restore_request_properties.rb +162 -0
- data/lib/azure_mgmt_web/models/restore_response.rb +92 -0
- data/lib/azure_mgmt_web/models/restore_response_properties.rb +57 -0
- data/lib/azure_mgmt_web/models/routing_rule.rb +58 -0
- data/lib/azure_mgmt_web/models/server_farm_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/server_farm_with_rich_sku.rb +108 -0
- data/lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb +164 -0
- data/lib/azure_mgmt_web/models/site.rb +92 -0
- data/lib/azure_mgmt_web/models/site_auth_settings.rb +379 -0
- data/lib/azure_mgmt_web/models/site_availability_state.rb +17 -0
- data/lib/azure_mgmt_web/models/site_cloneability.rb +157 -0
- data/lib/azure_mgmt_web/models/site_cloneability_criterion.rb +65 -0
- data/lib/azure_mgmt_web/models/site_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/site_config.rb +92 -0
- data/lib/azure_mgmt_web/models/site_config_properties.rb +554 -0
- data/lib/azure_mgmt_web/models/site_instance.rb +92 -0
- data/lib/azure_mgmt_web/models/site_instance_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/site_instance_properties.rb +56 -0
- data/lib/azure_mgmt_web/models/site_limits.rb +77 -0
- data/lib/azure_mgmt_web/models/site_load_balancing.rb +19 -0
- data/lib/azure_mgmt_web/models/site_logs_config.rb +92 -0
- data/lib/azure_mgmt_web/models/site_logs_config_properties.rb +110 -0
- data/lib/azure_mgmt_web/models/site_properties.rb +354 -0
- data/lib/azure_mgmt_web/models/site_source_control.rb +92 -0
- data/lib/azure_mgmt_web/models/site_source_control_properties.rb +92 -0
- data/lib/azure_mgmt_web/models/sku_capacity.rb +89 -0
- data/lib/azure_mgmt_web/models/sku_description.rb +93 -0
- data/lib/azure_mgmt_web/models/sku_info.rb +87 -0
- data/lib/azure_mgmt_web/models/sku_info_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/slot_config_names.rb +69 -0
- data/lib/azure_mgmt_web/models/slot_config_names_resource.rb +92 -0
- data/lib/azure_mgmt_web/models/slot_config_names_resource_properties.rb +66 -0
- data/lib/azure_mgmt_web/models/slot_difference.rb +93 -0
- data/lib/azure_mgmt_web/models/slot_difference_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/slot_difference_properties.rb +113 -0
- data/lib/azure_mgmt_web/models/slow_requests_based_trigger.rb +75 -0
- data/lib/azure_mgmt_web/models/source_control.rb +92 -0
- data/lib/azure_mgmt_web/models/source_control_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/source_control_properties.rb +94 -0
- data/lib/azure_mgmt_web/models/ssl_state.rb +17 -0
- data/lib/azure_mgmt_web/models/stamp_capacity.rb +155 -0
- data/lib/azure_mgmt_web/models/stamp_capacity_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/status_codes_based_trigger.rb +96 -0
- data/lib/azure_mgmt_web/models/status_options.rb +16 -0
- data/lib/azure_mgmt_web/models/string_dictionary.rb +86 -0
- data/lib/azure_mgmt_web/models/tld_legal_agreement.rb +83 -0
- data/lib/azure_mgmt_web/models/tld_legal_agreement_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/top_level_domain.rb +92 -0
- data/lib/azure_mgmt_web/models/top_level_domain_agreement_option.rb +57 -0
- data/lib/azure_mgmt_web/models/top_level_domain_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/top_level_domain_properties.rb +66 -0
- data/lib/azure_mgmt_web/models/unauthenticated_client_action.rb +16 -0
- data/lib/azure_mgmt_web/models/usage.rb +92 -0
- data/lib/azure_mgmt_web/models/usage_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/usage_properties.rb +136 -0
- data/lib/azure_mgmt_web/models/usage_state.rb +16 -0
- data/lib/azure_mgmt_web/models/user.rb +92 -0
- data/lib/azure_mgmt_web/models/user_properties.rb +74 -0
- data/lib/azure_mgmt_web/models/virtual_application.rb +103 -0
- data/lib/azure_mgmt_web/models/virtual_directory.rb +65 -0
- data/lib/azure_mgmt_web/models/virtual_ipmapping.rb +85 -0
- data/lib/azure_mgmt_web/models/virtual_network_profile.rb +83 -0
- data/lib/azure_mgmt_web/models/vnet_gateway.rb +93 -0
- data/lib/azure_mgmt_web/models/vnet_gateway_properties.rb +65 -0
- data/lib/azure_mgmt_web/models/vnet_info.rb +93 -0
- data/lib/azure_mgmt_web/models/vnet_info_properties.rb +106 -0
- data/lib/azure_mgmt_web/models/vnet_route.rb +92 -0
- data/lib/azure_mgmt_web/models/vnet_route_properties.rb +97 -0
- data/lib/azure_mgmt_web/models/worker_pool.rb +108 -0
- data/lib/azure_mgmt_web/models/worker_pool_collection.rb +85 -0
- data/lib/azure_mgmt_web/models/worker_pool_properties.rb +100 -0
- data/lib/azure_mgmt_web/models/worker_size_options.rb +18 -0
- data/lib/azure_mgmt_web/module_definition.rb +8 -0
- data/lib/azure_mgmt_web/provider.rb +346 -0
- data/lib/azure_mgmt_web/recommendations.rb +320 -0
- data/lib/azure_mgmt_web/server_farms.rb +1409 -0
- data/lib/azure_mgmt_web/sites.rb +11072 -0
- data/lib/azure_mgmt_web/top_level_domains.rb +226 -0
- data/lib/azure_mgmt_web/usage_operations.rb +88 -0
- data/lib/azure_mgmt_web/version.rb +8 -0
- data/lib/azure_mgmt_web/web_site_management_client.rb +118 -0
- metadata +346 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
|
+
# regenerated.
|
|
5
|
+
|
|
6
|
+
module Azure::ARM::Web
|
|
7
|
+
module Models
|
|
8
|
+
#
|
|
9
|
+
# Worker pool of a hostingEnvironment (App Service Environment)
|
|
10
|
+
#
|
|
11
|
+
class WorkerPool < MsRestAzure::Resource
|
|
12
|
+
|
|
13
|
+
include MsRestAzure
|
|
14
|
+
|
|
15
|
+
# @return [WorkerPoolProperties]
|
|
16
|
+
attr_accessor :properties
|
|
17
|
+
|
|
18
|
+
# @return [SkuDescription]
|
|
19
|
+
attr_accessor :sku
|
|
20
|
+
|
|
21
|
+
#
|
|
22
|
+
# Validate the object. Throws ValidationError if validation fails.
|
|
23
|
+
#
|
|
24
|
+
def validate
|
|
25
|
+
@properties.validate unless @properties.nil?
|
|
26
|
+
@sku.validate unless @sku.nil?
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
#
|
|
30
|
+
# Serializes given Model object into Ruby Hash.
|
|
31
|
+
# @param object Model object to serialize.
|
|
32
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
|
33
|
+
#
|
|
34
|
+
def self.serialize_object(object)
|
|
35
|
+
object.validate
|
|
36
|
+
output_object = {}
|
|
37
|
+
|
|
38
|
+
serialized_property = object.location
|
|
39
|
+
output_object['location'] = serialized_property unless serialized_property.nil?
|
|
40
|
+
|
|
41
|
+
serialized_property = object.id
|
|
42
|
+
output_object['id'] = serialized_property unless serialized_property.nil?
|
|
43
|
+
|
|
44
|
+
serialized_property = object.name
|
|
45
|
+
output_object['name'] = serialized_property unless serialized_property.nil?
|
|
46
|
+
|
|
47
|
+
serialized_property = object.type
|
|
48
|
+
output_object['type'] = serialized_property unless serialized_property.nil?
|
|
49
|
+
|
|
50
|
+
serialized_property = object.tags
|
|
51
|
+
output_object['tags'] = serialized_property unless serialized_property.nil?
|
|
52
|
+
|
|
53
|
+
serialized_property = object.properties
|
|
54
|
+
unless serialized_property.nil?
|
|
55
|
+
serialized_property = WorkerPoolProperties.serialize_object(serialized_property)
|
|
56
|
+
end
|
|
57
|
+
output_object['properties'] = serialized_property unless serialized_property.nil?
|
|
58
|
+
|
|
59
|
+
serialized_property = object.sku
|
|
60
|
+
unless serialized_property.nil?
|
|
61
|
+
serialized_property = SkuDescription.serialize_object(serialized_property)
|
|
62
|
+
end
|
|
63
|
+
output_object['sku'] = serialized_property unless serialized_property.nil?
|
|
64
|
+
|
|
65
|
+
output_object
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
#
|
|
69
|
+
# Deserializes given Ruby Hash into Model object.
|
|
70
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
|
71
|
+
# @return [WorkerPool] Deserialized object.
|
|
72
|
+
#
|
|
73
|
+
def self.deserialize_object(object)
|
|
74
|
+
return if object.nil?
|
|
75
|
+
output_object = WorkerPool.new
|
|
76
|
+
|
|
77
|
+
deserialized_property = object['location']
|
|
78
|
+
output_object.location = deserialized_property
|
|
79
|
+
|
|
80
|
+
deserialized_property = object['id']
|
|
81
|
+
output_object.id = deserialized_property
|
|
82
|
+
|
|
83
|
+
deserialized_property = object['name']
|
|
84
|
+
output_object.name = deserialized_property
|
|
85
|
+
|
|
86
|
+
deserialized_property = object['type']
|
|
87
|
+
output_object.type = deserialized_property
|
|
88
|
+
|
|
89
|
+
deserialized_property = object['tags']
|
|
90
|
+
output_object.tags = deserialized_property
|
|
91
|
+
|
|
92
|
+
deserialized_property = object['properties']
|
|
93
|
+
unless deserialized_property.nil?
|
|
94
|
+
deserialized_property = WorkerPoolProperties.deserialize_object(deserialized_property)
|
|
95
|
+
end
|
|
96
|
+
output_object.properties = deserialized_property
|
|
97
|
+
|
|
98
|
+
deserialized_property = object['sku']
|
|
99
|
+
unless deserialized_property.nil?
|
|
100
|
+
deserialized_property = SkuDescription.deserialize_object(deserialized_property)
|
|
101
|
+
end
|
|
102
|
+
output_object.sku = deserialized_property
|
|
103
|
+
|
|
104
|
+
output_object
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
|
+
# regenerated.
|
|
5
|
+
|
|
6
|
+
module Azure::ARM::Web
|
|
7
|
+
module Models
|
|
8
|
+
#
|
|
9
|
+
# Collection of worker pools
|
|
10
|
+
#
|
|
11
|
+
class WorkerPoolCollection
|
|
12
|
+
|
|
13
|
+
include MsRestAzure
|
|
14
|
+
|
|
15
|
+
# @return [Array<WorkerPool>] Collection of resources
|
|
16
|
+
attr_accessor :value
|
|
17
|
+
|
|
18
|
+
# @return [String] Link to next page of resources
|
|
19
|
+
attr_accessor :next_link
|
|
20
|
+
|
|
21
|
+
#
|
|
22
|
+
# Validate the object. Throws ValidationError if validation fails.
|
|
23
|
+
#
|
|
24
|
+
def validate
|
|
25
|
+
@value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
#
|
|
29
|
+
# Serializes given Model object into Ruby Hash.
|
|
30
|
+
# @param object Model object to serialize.
|
|
31
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
|
32
|
+
#
|
|
33
|
+
def self.serialize_object(object)
|
|
34
|
+
object.validate
|
|
35
|
+
output_object = {}
|
|
36
|
+
|
|
37
|
+
serialized_property = object.value
|
|
38
|
+
unless serialized_property.nil?
|
|
39
|
+
serializedArray = []
|
|
40
|
+
serialized_property.each do |element|
|
|
41
|
+
unless element.nil?
|
|
42
|
+
element = WorkerPool.serialize_object(element)
|
|
43
|
+
end
|
|
44
|
+
serializedArray.push(element)
|
|
45
|
+
end
|
|
46
|
+
serialized_property = serializedArray
|
|
47
|
+
end
|
|
48
|
+
output_object['value'] = serialized_property unless serialized_property.nil?
|
|
49
|
+
|
|
50
|
+
serialized_property = object.next_link
|
|
51
|
+
output_object['nextLink'] = serialized_property unless serialized_property.nil?
|
|
52
|
+
|
|
53
|
+
output_object
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
#
|
|
57
|
+
# Deserializes given Ruby Hash into Model object.
|
|
58
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
|
59
|
+
# @return [WorkerPoolCollection] Deserialized object.
|
|
60
|
+
#
|
|
61
|
+
def self.deserialize_object(object)
|
|
62
|
+
return if object.nil?
|
|
63
|
+
output_object = WorkerPoolCollection.new
|
|
64
|
+
|
|
65
|
+
deserialized_property = object['value']
|
|
66
|
+
unless deserialized_property.nil?
|
|
67
|
+
deserialized_array = []
|
|
68
|
+
deserialized_property.each do |element1|
|
|
69
|
+
unless element1.nil?
|
|
70
|
+
element1 = WorkerPool.deserialize_object(element1)
|
|
71
|
+
end
|
|
72
|
+
deserialized_array.push(element1)
|
|
73
|
+
end
|
|
74
|
+
deserialized_property = deserialized_array
|
|
75
|
+
end
|
|
76
|
+
output_object.value = deserialized_property
|
|
77
|
+
|
|
78
|
+
deserialized_property = object['nextLink']
|
|
79
|
+
output_object.next_link = deserialized_property
|
|
80
|
+
|
|
81
|
+
output_object
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
|
+
# regenerated.
|
|
5
|
+
|
|
6
|
+
module Azure::ARM::Web
|
|
7
|
+
module Models
|
|
8
|
+
#
|
|
9
|
+
# Model object.
|
|
10
|
+
#
|
|
11
|
+
class WorkerPoolProperties
|
|
12
|
+
|
|
13
|
+
include MsRestAzure
|
|
14
|
+
|
|
15
|
+
# @return [Integer] Worker size id for referencing this worker pool
|
|
16
|
+
attr_accessor :worker_size_id
|
|
17
|
+
|
|
18
|
+
# @return [ComputeModeOptions] Shared or dedicated web app hosting.
|
|
19
|
+
# Possible values include: 'Shared', 'Dedicated'
|
|
20
|
+
attr_accessor :compute_mode
|
|
21
|
+
|
|
22
|
+
# @return [String] VM size of the worker pool instances
|
|
23
|
+
attr_accessor :worker_size
|
|
24
|
+
|
|
25
|
+
# @return [Integer] Number of instances in the worker pool
|
|
26
|
+
attr_accessor :worker_count
|
|
27
|
+
|
|
28
|
+
# @return [Array<String>] Names of all instances in the worker pool
|
|
29
|
+
# (read only)
|
|
30
|
+
attr_accessor :instance_names
|
|
31
|
+
|
|
32
|
+
#
|
|
33
|
+
# Validate the object. Throws ValidationError if validation fails.
|
|
34
|
+
#
|
|
35
|
+
def validate
|
|
36
|
+
@instance_names.each{ |e| e.validate if e.respond_to?(:validate) } unless @instance_names.nil?
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
#
|
|
40
|
+
# Serializes given Model object into Ruby Hash.
|
|
41
|
+
# @param object Model object to serialize.
|
|
42
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
|
43
|
+
#
|
|
44
|
+
def self.serialize_object(object)
|
|
45
|
+
object.validate
|
|
46
|
+
output_object = {}
|
|
47
|
+
|
|
48
|
+
serialized_property = object.worker_size_id
|
|
49
|
+
output_object['workerSizeId'] = serialized_property unless serialized_property.nil?
|
|
50
|
+
|
|
51
|
+
serialized_property = object.compute_mode
|
|
52
|
+
output_object['computeMode'] = serialized_property unless serialized_property.nil?
|
|
53
|
+
|
|
54
|
+
serialized_property = object.worker_size
|
|
55
|
+
output_object['workerSize'] = serialized_property unless serialized_property.nil?
|
|
56
|
+
|
|
57
|
+
serialized_property = object.worker_count
|
|
58
|
+
output_object['workerCount'] = serialized_property unless serialized_property.nil?
|
|
59
|
+
|
|
60
|
+
serialized_property = object.instance_names
|
|
61
|
+
output_object['instanceNames'] = serialized_property unless serialized_property.nil?
|
|
62
|
+
|
|
63
|
+
output_object
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
#
|
|
67
|
+
# Deserializes given Ruby Hash into Model object.
|
|
68
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
|
69
|
+
# @return [WorkerPoolProperties] Deserialized object.
|
|
70
|
+
#
|
|
71
|
+
def self.deserialize_object(object)
|
|
72
|
+
return if object.nil?
|
|
73
|
+
output_object = WorkerPoolProperties.new
|
|
74
|
+
|
|
75
|
+
deserialized_property = object['workerSizeId']
|
|
76
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
|
77
|
+
output_object.worker_size_id = deserialized_property
|
|
78
|
+
|
|
79
|
+
deserialized_property = object['computeMode']
|
|
80
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
|
81
|
+
enum_is_valid = ComputeModeOptions.constants.any? { |e| ComputeModeOptions.const_get(e).to_s.downcase == deserialized_property.downcase }
|
|
82
|
+
warn 'Enum ComputeModeOptions does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
|
83
|
+
end
|
|
84
|
+
output_object.compute_mode = deserialized_property
|
|
85
|
+
|
|
86
|
+
deserialized_property = object['workerSize']
|
|
87
|
+
output_object.worker_size = deserialized_property
|
|
88
|
+
|
|
89
|
+
deserialized_property = object['workerCount']
|
|
90
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
|
91
|
+
output_object.worker_count = deserialized_property
|
|
92
|
+
|
|
93
|
+
deserialized_property = object['instanceNames']
|
|
94
|
+
output_object.instance_names = deserialized_property
|
|
95
|
+
|
|
96
|
+
output_object
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
|
+
# regenerated.
|
|
5
|
+
|
|
6
|
+
module Azure::ARM::Web
|
|
7
|
+
module Models
|
|
8
|
+
#
|
|
9
|
+
# Defines values for WorkerSizeOptions
|
|
10
|
+
#
|
|
11
|
+
module WorkerSizeOptions
|
|
12
|
+
Default = "Default"
|
|
13
|
+
Small = "Small"
|
|
14
|
+
Medium = "Medium"
|
|
15
|
+
Large = "Large"
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
|
+
# regenerated.
|
|
5
|
+
|
|
6
|
+
module Azure::ARM::Web
|
|
7
|
+
#
|
|
8
|
+
# Use these APIs to manage Azure Websites resources through the Azure
|
|
9
|
+
# Resource Manager. All task operations conform to the HTTP/1.1 protocol
|
|
10
|
+
# specification and each operation returns an x-ms-request-id header that
|
|
11
|
+
# can be used to obtain information about the request. You must make sure
|
|
12
|
+
# that requests made to these resources are secure. For more information,
|
|
13
|
+
# see <a
|
|
14
|
+
# href="https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx">Authenticating
|
|
15
|
+
# Azure Resource Manager requests.</a>
|
|
16
|
+
#
|
|
17
|
+
class Provider
|
|
18
|
+
include Azure::ARM::Web::Models
|
|
19
|
+
include MsRestAzure
|
|
20
|
+
|
|
21
|
+
#
|
|
22
|
+
# Creates and initializes a new instance of the Provider class.
|
|
23
|
+
# @param client service class for accessing basic functionality.
|
|
24
|
+
#
|
|
25
|
+
def initialize(client)
|
|
26
|
+
@client = client
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# @return reference to the WebSiteManagementClient
|
|
30
|
+
attr_reader :client
|
|
31
|
+
|
|
32
|
+
#
|
|
33
|
+
# Gets the source controls available for Azure websites
|
|
34
|
+
#
|
|
35
|
+
# @param [Hash{String => String}] The hash of custom headers need to be
|
|
36
|
+
# applied to HTTP request.
|
|
37
|
+
#
|
|
38
|
+
# @return [Concurrent::Promise] Promise object which allows to get HTTP
|
|
39
|
+
# response.
|
|
40
|
+
#
|
|
41
|
+
def get_source_controls(custom_headers = nil)
|
|
42
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
43
|
+
request_headers = {}
|
|
44
|
+
|
|
45
|
+
# Set Headers
|
|
46
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
47
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
48
|
+
path_template = '/providers/Microsoft.Web/sourcecontrols'
|
|
49
|
+
options = {
|
|
50
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
51
|
+
query_params: {'api-version' => @client.api_version},
|
|
52
|
+
headers: request_headers.merge(custom_headers || {})
|
|
53
|
+
}
|
|
54
|
+
request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
|
|
55
|
+
promise = request.run_promise do |req|
|
|
56
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
promise = promise.then do |http_response|
|
|
60
|
+
status_code = http_response.status
|
|
61
|
+
response_content = http_response.body
|
|
62
|
+
unless status_code == 200
|
|
63
|
+
error_model = JSON.load(response_content)
|
|
64
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Create Result
|
|
68
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
|
69
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
70
|
+
# Deserialize Response
|
|
71
|
+
if status_code == 200
|
|
72
|
+
begin
|
|
73
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
74
|
+
unless parsed_response.nil?
|
|
75
|
+
parsed_response = SourceControlCollection.deserialize_object(parsed_response)
|
|
76
|
+
end
|
|
77
|
+
result.body = parsed_response
|
|
78
|
+
rescue Exception => e
|
|
79
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
result
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
promise.execute
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
#
|
|
90
|
+
# Gets source control token
|
|
91
|
+
#
|
|
92
|
+
# @param source_control_type [String] Type of source control
|
|
93
|
+
# @param [Hash{String => String}] The hash of custom headers need to be
|
|
94
|
+
# applied to HTTP request.
|
|
95
|
+
#
|
|
96
|
+
# @return [Concurrent::Promise] Promise object which allows to get HTTP
|
|
97
|
+
# response.
|
|
98
|
+
#
|
|
99
|
+
def get_source_control(source_control_type, custom_headers = nil)
|
|
100
|
+
fail ArgumentError, 'source_control_type is nil' if source_control_type.nil?
|
|
101
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
102
|
+
request_headers = {}
|
|
103
|
+
|
|
104
|
+
# Set Headers
|
|
105
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
106
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
107
|
+
path_template = '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'
|
|
108
|
+
options = {
|
|
109
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
110
|
+
path_params: {'sourceControlType' => source_control_type},
|
|
111
|
+
query_params: {'api-version' => @client.api_version},
|
|
112
|
+
headers: request_headers.merge(custom_headers || {})
|
|
113
|
+
}
|
|
114
|
+
request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
|
|
115
|
+
promise = request.run_promise do |req|
|
|
116
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
promise = promise.then do |http_response|
|
|
120
|
+
status_code = http_response.status
|
|
121
|
+
response_content = http_response.body
|
|
122
|
+
unless status_code == 200
|
|
123
|
+
error_model = JSON.load(response_content)
|
|
124
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Create Result
|
|
128
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
|
129
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
130
|
+
# Deserialize Response
|
|
131
|
+
if status_code == 200
|
|
132
|
+
begin
|
|
133
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
134
|
+
unless parsed_response.nil?
|
|
135
|
+
parsed_response = SourceControl.deserialize_object(parsed_response)
|
|
136
|
+
end
|
|
137
|
+
result.body = parsed_response
|
|
138
|
+
rescue Exception => e
|
|
139
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
result
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
promise.execute
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
#
|
|
150
|
+
# Updates source control token
|
|
151
|
+
#
|
|
152
|
+
# @param source_control_type [String] Type of source control
|
|
153
|
+
# @param request_message [SourceControl] Source control token information
|
|
154
|
+
# @param [Hash{String => String}] The hash of custom headers need to be
|
|
155
|
+
# applied to HTTP request.
|
|
156
|
+
#
|
|
157
|
+
# @return [Concurrent::Promise] Promise object which allows to get HTTP
|
|
158
|
+
# response.
|
|
159
|
+
#
|
|
160
|
+
def update_source_control(source_control_type, request_message, custom_headers = nil)
|
|
161
|
+
fail ArgumentError, 'source_control_type is nil' if source_control_type.nil?
|
|
162
|
+
fail ArgumentError, 'request_message is nil' if request_message.nil?
|
|
163
|
+
request_message.validate unless request_message.nil?
|
|
164
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
165
|
+
request_headers = {}
|
|
166
|
+
|
|
167
|
+
# Set Headers
|
|
168
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
169
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
170
|
+
|
|
171
|
+
# Serialize Request
|
|
172
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
173
|
+
unless request_message.nil?
|
|
174
|
+
request_message = SourceControl.serialize_object(request_message)
|
|
175
|
+
end
|
|
176
|
+
request_content = JSON.generate(request_message, quirks_mode: true)
|
|
177
|
+
path_template = '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'
|
|
178
|
+
options = {
|
|
179
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
180
|
+
path_params: {'sourceControlType' => source_control_type},
|
|
181
|
+
query_params: {'api-version' => @client.api_version},
|
|
182
|
+
body: request_content,
|
|
183
|
+
headers: request_headers.merge(custom_headers || {})
|
|
184
|
+
}
|
|
185
|
+
request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :put, options)
|
|
186
|
+
promise = request.run_promise do |req|
|
|
187
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
promise = promise.then do |http_response|
|
|
191
|
+
status_code = http_response.status
|
|
192
|
+
response_content = http_response.body
|
|
193
|
+
unless status_code == 200
|
|
194
|
+
error_model = JSON.load(response_content)
|
|
195
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Create Result
|
|
199
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
|
200
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
201
|
+
# Deserialize Response
|
|
202
|
+
if status_code == 200
|
|
203
|
+
begin
|
|
204
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
205
|
+
unless parsed_response.nil?
|
|
206
|
+
parsed_response = SourceControl.deserialize_object(parsed_response)
|
|
207
|
+
end
|
|
208
|
+
result.body = parsed_response
|
|
209
|
+
rescue Exception => e
|
|
210
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
result
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
promise.execute
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
#
|
|
221
|
+
# Gets publishing user
|
|
222
|
+
#
|
|
223
|
+
# @param [Hash{String => String}] The hash of custom headers need to be
|
|
224
|
+
# applied to HTTP request.
|
|
225
|
+
#
|
|
226
|
+
# @return [Concurrent::Promise] Promise object which allows to get HTTP
|
|
227
|
+
# response.
|
|
228
|
+
#
|
|
229
|
+
def get_publishing_user(custom_headers = nil)
|
|
230
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
231
|
+
request_headers = {}
|
|
232
|
+
|
|
233
|
+
# Set Headers
|
|
234
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
235
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
236
|
+
path_template = '/providers/Microsoft.Web/publishingUsers/web'
|
|
237
|
+
options = {
|
|
238
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
239
|
+
query_params: {'api-version' => @client.api_version},
|
|
240
|
+
headers: request_headers.merge(custom_headers || {})
|
|
241
|
+
}
|
|
242
|
+
request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
|
|
243
|
+
promise = request.run_promise do |req|
|
|
244
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
promise = promise.then do |http_response|
|
|
248
|
+
status_code = http_response.status
|
|
249
|
+
response_content = http_response.body
|
|
250
|
+
unless status_code == 200
|
|
251
|
+
error_model = JSON.load(response_content)
|
|
252
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Create Result
|
|
256
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
|
257
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
258
|
+
# Deserialize Response
|
|
259
|
+
if status_code == 200
|
|
260
|
+
begin
|
|
261
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
262
|
+
unless parsed_response.nil?
|
|
263
|
+
parsed_response = User.deserialize_object(parsed_response)
|
|
264
|
+
end
|
|
265
|
+
result.body = parsed_response
|
|
266
|
+
rescue Exception => e
|
|
267
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
result
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
promise.execute
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
#
|
|
278
|
+
# Updates publishing user
|
|
279
|
+
#
|
|
280
|
+
# @param request_message [User] Details of publishing user
|
|
281
|
+
# @param [Hash{String => String}] The hash of custom headers need to be
|
|
282
|
+
# applied to HTTP request.
|
|
283
|
+
#
|
|
284
|
+
# @return [Concurrent::Promise] Promise object which allows to get HTTP
|
|
285
|
+
# response.
|
|
286
|
+
#
|
|
287
|
+
def update_publishing_user(request_message, custom_headers = nil)
|
|
288
|
+
fail ArgumentError, 'request_message is nil' if request_message.nil?
|
|
289
|
+
request_message.validate unless request_message.nil?
|
|
290
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
291
|
+
request_headers = {}
|
|
292
|
+
|
|
293
|
+
# Set Headers
|
|
294
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
295
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
296
|
+
|
|
297
|
+
# Serialize Request
|
|
298
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
299
|
+
unless request_message.nil?
|
|
300
|
+
request_message = User.serialize_object(request_message)
|
|
301
|
+
end
|
|
302
|
+
request_content = JSON.generate(request_message, quirks_mode: true)
|
|
303
|
+
path_template = '/providers/Microsoft.Web/publishingUsers/web'
|
|
304
|
+
options = {
|
|
305
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
306
|
+
query_params: {'api-version' => @client.api_version},
|
|
307
|
+
body: request_content,
|
|
308
|
+
headers: request_headers.merge(custom_headers || {})
|
|
309
|
+
}
|
|
310
|
+
request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :put, options)
|
|
311
|
+
promise = request.run_promise do |req|
|
|
312
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
promise = promise.then do |http_response|
|
|
316
|
+
status_code = http_response.status
|
|
317
|
+
response_content = http_response.body
|
|
318
|
+
unless status_code == 200
|
|
319
|
+
error_model = JSON.load(response_content)
|
|
320
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Create Result
|
|
324
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
|
325
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
326
|
+
# Deserialize Response
|
|
327
|
+
if status_code == 200
|
|
328
|
+
begin
|
|
329
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
330
|
+
unless parsed_response.nil?
|
|
331
|
+
parsed_response = User.deserialize_object(parsed_response)
|
|
332
|
+
end
|
|
333
|
+
result.body = parsed_response
|
|
334
|
+
rescue Exception => e
|
|
335
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
336
|
+
end
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
result
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
promise.execute
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
end
|
|
346
|
+
end
|