Class: Azure::MobileEngagement::Profiles::Latest::Mgmt::MobileEngagementManagementClass

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

Overview

MobileEngagementManagementClass

Direct Known Subclasses

Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ MobileEngagementManagementClass

Returns a new instance of MobileEngagementManagementClass.



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
# File 'lib/profiles/latest/modules/mobileengagement_profile_module.rb', line 115

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::MobileEngagement::Mgmt::V2014_12_01::EngagementManagementClient.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)
  @app_collections = @client_0.app_collections
  @apps = @client_0.apps
  @supported_platforms = @client_0.supported_platforms
  @campaigns = @client_0.campaigns
  @devices = @client_0.devices
  @export_tasks = @client_0.export_tasks
  @import_tasks = @client_0.import_tasks

  @model_classes = ModelClasses.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



149
150
151
152
153
154
155
# File 'lib/profiles/latest/modules/mobileengagement_profile_module.rb', line 149

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

Instance Attribute Details

#app_collectionsObject (readonly)

Returns the value of attribute app_collections.



113
114
115
# File 'lib/profiles/latest/modules/mobileengagement_profile_module.rb', line 113

def app_collections
  @app_collections
end

#appsObject (readonly)

Returns the value of attribute apps.



113
114
115
# File 'lib/profiles/latest/modules/mobileengagement_profile_module.rb', line 113

def apps
  @apps
end

#base_urlObject (readonly)

Returns the value of attribute base_url.



113
114
115
# File 'lib/profiles/latest/modules/mobileengagement_profile_module.rb', line 113

def base_url
  @base_url
end

#campaignsObject (readonly)

Returns the value of attribute campaigns.



113
114
115
# File 'lib/profiles/latest/modules/mobileengagement_profile_module.rb', line 113

def campaigns
  @campaigns
end

#configurableObject (readonly)

Returns the value of attribute configurable.



113
114
115
# File 'lib/profiles/latest/modules/mobileengagement_profile_module.rb', line 113

def configurable
  @configurable
end

#devicesObject (readonly)

Returns the value of attribute devices.



113
114
115
# File 'lib/profiles/latest/modules/mobileengagement_profile_module.rb', line 113

def devices
  @devices
end

#export_tasksObject (readonly)

Returns the value of attribute export_tasks.



113
114
115
# File 'lib/profiles/latest/modules/mobileengagement_profile_module.rb', line 113

def export_tasks
  @export_tasks
end

#import_tasksObject (readonly)

Returns the value of attribute import_tasks.



113
114
115
# File 'lib/profiles/latest/modules/mobileengagement_profile_module.rb', line 113

def import_tasks
  @import_tasks
end

#model_classesObject (readonly)

Returns the value of attribute model_classes.



113
114
115
# File 'lib/profiles/latest/modules/mobileengagement_profile_module.rb', line 113

def model_classes
  @model_classes
end

#optionsObject (readonly)

Returns the value of attribute options.



113
114
115
# File 'lib/profiles/latest/modules/mobileengagement_profile_module.rb', line 113

def options
  @options
end

#supported_platformsObject (readonly)

Returns the value of attribute supported_platforms.



113
114
115
# File 'lib/profiles/latest/modules/mobileengagement_profile_module.rb', line 113

def supported_platforms
  @supported_platforms
end

Instance Method Details

#add_telemetry(client) ⇒ Object



144
145
146
147
# File 'lib/profiles/latest/modules/mobileengagement_profile_module.rb', line 144

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