Class: Azure::Web::Profiles::V2018_03_01::Mgmt::WebManagementClass

Inherits:
Object
  • Object
show all
Defined in:
lib/profiles/v2018_03_01/modules/web_profile_module.rb

Overview

WebManagementClass

Direct Known Subclasses

Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ WebManagementClass

Returns a new instance of WebManagementClass.



314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
# File 'lib/profiles/v2018_03_01/modules/web_profile_module.rb', line 314

def initialize(options = {})
  if options.is_a?(Hash) && options.length == 0
    @options = setup_default_options
  else
    @options = options
  end

  reset!(options)

  @configurable = self
  @base_url = options[:base_url].nil? ? nil:options[:base_url]
  @options = options[:options].nil? ? nil:options[:options]

  @client_0 = Azure::Web::Mgmt::V2016_03_01::WebSiteManagementClient.new(configurable.credentials, base_url, options)
  if(@client_0.respond_to?(:subscription_id))
    @client_0.subscription_id = configurable.subscription_id
  end
  add_telemetry(@client_0)
  @certificates = @client_0.certificates
  @deleted_web_apps = @client_0.deleted_web_apps
  @diagnostics = @client_0.diagnostics
  @provider = @client_0.provider
  @recommendations = @client_0.recommendations
  @resource_health_metadata_operations = @client_0.
  @billing_meters = @client_0.billing_meters

  @client_1 = Azure::Web::Mgmt::V2016_08_01::WebSiteManagementClient.new(configurable.credentials, base_url, options)
  if(@client_1.respond_to?(:subscription_id))
    @client_1.subscription_id = configurable.subscription_id
  end
  add_telemetry(@client_1)
  @web_apps = @client_1.web_apps

  @client_2 = Azure::Web::Mgmt::V2016_09_01::WebSiteManagementClient.new(configurable.credentials, base_url, options)
  if(@client_2.respond_to?(:subscription_id))
    @client_2.subscription_id = configurable.subscription_id
  end
  add_telemetry(@client_2)
  @app_service_environments = @client_2.app_service_environments
  @app_service_plans = @client_2.app_service_plans

  @model_classes = ModelClasses.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



363
364
365
366
367
368
369
370
371
372
373
# File 'lib/profiles/v2018_03_01/modules/web_profile_module.rb', line 363

def method_missing(method, *args)
  if @client_2.respond_to?method
    @client_2.send(method, *args)
  elsif @client_1.respond_to?method
    @client_1.send(method, *args)
  elsif @client_0.respond_to?method
    @client_0.send(method, *args)
  else
    super
  end
end

Instance Attribute Details

#app_service_environmentsObject (readonly)

Returns the value of attribute app_service_environments.



312
313
314
# File 'lib/profiles/v2018_03_01/modules/web_profile_module.rb', line 312

def app_service_environments
  @app_service_environments
end

#app_service_plansObject (readonly)

Returns the value of attribute app_service_plans.



312
313
314
# File 'lib/profiles/v2018_03_01/modules/web_profile_module.rb', line 312

def app_service_plans
  @app_service_plans
end

#base_urlObject (readonly)

Returns the value of attribute base_url.



312
313
314
# File 'lib/profiles/v2018_03_01/modules/web_profile_module.rb', line 312

def base_url
  @base_url
end

#billing_metersObject (readonly)

Returns the value of attribute billing_meters.



312
313
314
# File 'lib/profiles/v2018_03_01/modules/web_profile_module.rb', line 312

def billing_meters
  @billing_meters
end

#certificatesObject (readonly)

Returns the value of attribute certificates.



312
313
314
# File 'lib/profiles/v2018_03_01/modules/web_profile_module.rb', line 312

def certificates
  @certificates
end

#configurableObject (readonly)

Returns the value of attribute configurable.



312
313
314
# File 'lib/profiles/v2018_03_01/modules/web_profile_module.rb', line 312

def configurable
  @configurable
end

#deleted_web_appsObject (readonly)

Returns the value of attribute deleted_web_apps.



312
313
314
# File 'lib/profiles/v2018_03_01/modules/web_profile_module.rb', line 312

def deleted_web_apps
  @deleted_web_apps
end

#diagnosticsObject (readonly)

Returns the value of attribute diagnostics.



312
313
314
# File 'lib/profiles/v2018_03_01/modules/web_profile_module.rb', line 312

def diagnostics
  @diagnostics
end

#model_classesObject (readonly)

Returns the value of attribute model_classes.



312
313
314
# File 'lib/profiles/v2018_03_01/modules/web_profile_module.rb', line 312

def model_classes
  @model_classes
end

#optionsObject (readonly)

Returns the value of attribute options.



312
313
314
# File 'lib/profiles/v2018_03_01/modules/web_profile_module.rb', line 312

def options
  @options
end

#providerObject (readonly)

Returns the value of attribute provider.



312
313
314
# File 'lib/profiles/v2018_03_01/modules/web_profile_module.rb', line 312

def provider
  @provider
end

#recommendationsObject (readonly)

Returns the value of attribute recommendations.



312
313
314
# File 'lib/profiles/v2018_03_01/modules/web_profile_module.rb', line 312

def recommendations
  @recommendations
end

#resource_health_metadata_operationsObject (readonly)

Returns the value of attribute resource_health_metadata_operations.



312
313
314
# File 'lib/profiles/v2018_03_01/modules/web_profile_module.rb', line 312

def 
  @resource_health_metadata_operations
end

#web_appsObject (readonly)

Returns the value of attribute web_apps.



312
313
314
# File 'lib/profiles/v2018_03_01/modules/web_profile_module.rb', line 312

def web_apps
  @web_apps
end

Instance Method Details

#add_telemetry(client) ⇒ Object



358
359
360
361
# File 'lib/profiles/v2018_03_01/modules/web_profile_module.rb', line 358

def add_telemetry(client)
  profile_information = 'Profiles/V2018_03_01/Web/Mgmt'
  client.add_user_agent_information(profile_information)
end