Class: Azure::Resources2::Profiles::Latest::Mgmt::ResourcesManagementClass

Inherits:
Object
  • Object
show all
Defined in:
lib/profiles2/latest/modules/resources_profile_module.rb

Overview

ResourcesManagementClass

Direct Known Subclasses

Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ResourcesManagementClass



111
112
113
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
# File 'lib/profiles2/latest/modules/resources_profile_module.rb', line 111

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::Resources2::Mgmt::V2020_06_01::ResourceManagementClient.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)
  @operations = @client_0.operations
  @deployments = @client_0.deployments
  @providers = @client_0.providers
  @resources = @client_0.resources
  @resource_groups = @client_0.resource_groups
  @tags_operations = @client_0.tags_operations
  @deployment_operations = @client_0.deployment_operations

  @model_classes = ModelClasses.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



145
146
147
148
149
150
151
# File 'lib/profiles2/latest/modules/resources_profile_module.rb', line 145

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.



109
110
111
# File 'lib/profiles2/latest/modules/resources_profile_module.rb', line 109

def base_url
  @base_url
end

#configurableObject (readonly)

Returns the value of attribute configurable.



109
110
111
# File 'lib/profiles2/latest/modules/resources_profile_module.rb', line 109

def configurable
  @configurable
end

#deployment_operationsObject (readonly)

Returns the value of attribute deployment_operations.



109
110
111
# File 'lib/profiles2/latest/modules/resources_profile_module.rb', line 109

def deployment_operations
  @deployment_operations
end

#deploymentsObject (readonly)

Returns the value of attribute deployments.



109
110
111
# File 'lib/profiles2/latest/modules/resources_profile_module.rb', line 109

def deployments
  @deployments
end

#model_classesObject (readonly)

Returns the value of attribute model_classes.



109
110
111
# File 'lib/profiles2/latest/modules/resources_profile_module.rb', line 109

def model_classes
  @model_classes
end

#operationsObject (readonly)

Returns the value of attribute operations.



109
110
111
# File 'lib/profiles2/latest/modules/resources_profile_module.rb', line 109

def operations
  @operations
end

#optionsObject (readonly)

Returns the value of attribute options.



109
110
111
# File 'lib/profiles2/latest/modules/resources_profile_module.rb', line 109

def options
  @options
end

#providersObject (readonly)

Returns the value of attribute providers.



109
110
111
# File 'lib/profiles2/latest/modules/resources_profile_module.rb', line 109

def providers
  @providers
end

#resource_groupsObject (readonly)

Returns the value of attribute resource_groups.



109
110
111
# File 'lib/profiles2/latest/modules/resources_profile_module.rb', line 109

def resource_groups
  @resource_groups
end

#resourcesObject (readonly)

Returns the value of attribute resources.



109
110
111
# File 'lib/profiles2/latest/modules/resources_profile_module.rb', line 109

def resources
  @resources
end

#tags_operationsObject (readonly)

Returns the value of attribute tags_operations.



109
110
111
# File 'lib/profiles2/latest/modules/resources_profile_module.rb', line 109

def tags_operations
  @tags_operations
end

Instance Method Details

#add_telemetry(client) ⇒ Object



140
141
142
143
# File 'lib/profiles2/latest/modules/resources_profile_module.rb', line 140

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