Class: Azure::ARM::Web::Models::ServerFarmWithRichSkuProperties

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb

Overview

Model object.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#admin_site_nameString

Returns App Service Plan administration site.

Returns:

  • (String)

    App Service Plan administration site



29
30
31
# File 'lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb', line 29

def admin_site_name
  @admin_site_name
end

#geo_regionString

Returns Geographical location for the App Service Plan.

Returns:

  • (String)

    Geographical location for the App Service Plan



40
41
42
# File 'lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb', line 40

def geo_region
  @geo_region
end

#hosting_environment_profileHostingEnvironmentProfile

environment (App Service Environment) to use for the App Service Plan

Returns:



33
34
35
# File 'lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb', line 33

def hosting_environment_profile
  @hosting_environment_profile
end

#maximum_number_of_workersInteger

this App Service Plan

Returns:

  • (Integer)

    Maximum number of instances that can be assigned to



37
38
39
# File 'lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb', line 37

def maximum_number_of_workers
  @maximum_number_of_workers
end

#nameString

Returns Name for the App Service Plan.

Returns:

  • (String)

    Name for the App Service Plan



16
17
18
# File 'lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb', line 16

def name
  @name
end

#number_of_sitesInteger

Returns Number of web apps assigned to this App Service Plan.

Returns:

  • (Integer)

    Number of web apps assigned to this App Service Plan



49
50
51
# File 'lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb', line 49

def number_of_sites
  @number_of_sites
end

#per_site_scalingBoolean

be scaled independently If False apps assigned to this App Service Plan will scale to all instances of the plan

Returns:

  • (Boolean)

    If True apps assigned to this App Service Plan can



46
47
48
# File 'lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb', line 46

def per_site_scaling
  @per_site_scaling
end

#resource_groupString

Returns Resource group of the serverfarm.

Returns:

  • (String)

    Resource group of the serverfarm



52
53
54
# File 'lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb', line 52

def resource_group
  @resource_group
end

#statusStatusOptions

include: ‘Ready’, ‘Pending’

Returns:



23
24
25
# File 'lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb', line 23

def status
  @status
end

#subscriptionString

Returns App Service Plan Subscription.

Returns:

  • (String)

    App Service Plan Subscription



26
27
28
# File 'lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb', line 26

def subscription
  @subscription
end

#worker_tier_nameString

Returns Target worker tier assigned to the App Service Plan.

Returns:

  • (String)

    Target worker tier assigned to the App Service Plan



19
20
21
# File 'lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb', line 19

def worker_tier_name
  @worker_tier_name
end

Class Method Details

.deserialize_object(object) ⇒ ServerFarmWithRichSkuProperties

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb', line 114

def self.deserialize_object(object)
  return if object.nil?
  output_object = ServerFarmWithRichSkuProperties.new

  deserialized_property = object['name']
  output_object.name = deserialized_property

  deserialized_property = object['workerTierName']
  output_object.worker_tier_name = deserialized_property

  deserialized_property = object['status']
  if (!deserialized_property.nil? && !deserialized_property.empty?)
    enum_is_valid = StatusOptions.constants.any? { |e| StatusOptions.const_get(e).to_s.downcase == deserialized_property.downcase }
    warn 'Enum StatusOptions does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
  end
  output_object.status = deserialized_property

  deserialized_property = object['subscription']
  output_object.subscription = deserialized_property

  deserialized_property = object['adminSiteName']
  output_object.admin_site_name = deserialized_property

  deserialized_property = object['hostingEnvironmentProfile']
  unless deserialized_property.nil?
    deserialized_property = HostingEnvironmentProfile.deserialize_object(deserialized_property)
  end
  output_object.hosting_environment_profile = deserialized_property

  deserialized_property = object['maximumNumberOfWorkers']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.maximum_number_of_workers = deserialized_property

  deserialized_property = object['geoRegion']
  output_object.geo_region = deserialized_property

  deserialized_property = object['perSiteScaling']
  output_object.per_site_scaling = deserialized_property

  deserialized_property = object['numberOfSites']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.number_of_sites = deserialized_property

  deserialized_property = object['resourceGroup']
  output_object.resource_group = deserialized_property

  output_object
end

.serialize_object(object) ⇒ Hash

Serializes given Model object into Ruby Hash.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of Ruby Hash.



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb', line 66

def self.serialize_object(object)
  object.validate
  output_object = {}

  serialized_property = object.name
  output_object['name'] = serialized_property unless serialized_property.nil?

  serialized_property = object.worker_tier_name
  output_object['workerTierName'] = serialized_property unless serialized_property.nil?

  serialized_property = object.status
  output_object['status'] = serialized_property unless serialized_property.nil?

  serialized_property = object.subscription
  output_object['subscription'] = serialized_property unless serialized_property.nil?

  serialized_property = object.admin_site_name
  output_object['adminSiteName'] = serialized_property unless serialized_property.nil?

  serialized_property = object.hosting_environment_profile
  unless serialized_property.nil?
    serialized_property = HostingEnvironmentProfile.serialize_object(serialized_property)
  end
  output_object['hostingEnvironmentProfile'] = serialized_property unless serialized_property.nil?

  serialized_property = object.maximum_number_of_workers
  output_object['maximumNumberOfWorkers'] = serialized_property unless serialized_property.nil?

  serialized_property = object.geo_region
  output_object['geoRegion'] = serialized_property unless serialized_property.nil?

  serialized_property = object.per_site_scaling
  output_object['perSiteScaling'] = serialized_property unless serialized_property.nil?

  serialized_property = object.number_of_sites
  output_object['numberOfSites'] = serialized_property unless serialized_property.nil?

  serialized_property = object.resource_group
  output_object['resourceGroup'] = serialized_property unless serialized_property.nil?

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



57
58
59
# File 'lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb', line 57

def validate
  @hosting_environment_profile.validate unless @hosting_environment_profile.nil?
end