Class: Azure::Dns::Profiles::Latest::Mgmt::DnsManagementClass

Inherits:
Object
  • Object
show all
Defined in:
lib/profiles/latest/modules/dns_profile_module.rb

Overview

DnsManagementClass

Direct Known Subclasses

Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ DnsManagementClass

Returns a new instance of DnsManagementClass.



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/profiles/latest/modules/dns_profile_module.rb', line 44

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::Dns::Mgmt::V2018_03_01_preview::DnsManagementClient.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)
  @record_sets = @client_0.record_sets
  @zones = @client_0.zones

  @model_classes = ModelClasses.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



73
74
75
76
77
78
79
# File 'lib/profiles/latest/modules/dns_profile_module.rb', line 73

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

Instance Attribute Details

#base_urlObject (readonly)

Returns the value of attribute base_url.



42
43
44
# File 'lib/profiles/latest/modules/dns_profile_module.rb', line 42

def base_url
  @base_url
end

#configurableObject (readonly)

Returns the value of attribute configurable.



42
43
44
# File 'lib/profiles/latest/modules/dns_profile_module.rb', line 42

def configurable
  @configurable
end

#model_classesObject (readonly)

Returns the value of attribute model_classes.



42
43
44
# File 'lib/profiles/latest/modules/dns_profile_module.rb', line 42

def model_classes
  @model_classes
end

#optionsObject (readonly)

Returns the value of attribute options.



42
43
44
# File 'lib/profiles/latest/modules/dns_profile_module.rb', line 42

def options
  @options
end

#record_setsObject (readonly)

Returns the value of attribute record_sets.



42
43
44
# File 'lib/profiles/latest/modules/dns_profile_module.rb', line 42

def record_sets
  @record_sets
end

#zonesObject (readonly)

Returns the value of attribute zones.



42
43
44
# File 'lib/profiles/latest/modules/dns_profile_module.rb', line 42

def zones
  @zones
end

Instance Method Details

#add_telemetry(client) ⇒ Object



68
69
70
71
# File 'lib/profiles/latest/modules/dns_profile_module.rb', line 68

def add_telemetry(client)
  profile_information = 'Profiles/Latest/Dns/Mgmt'
  client.add_user_agent_information(profile_information)
end