Class: Azure::BatchAI::Profiles::Latest::Mgmt::BatchAIManagementClass

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

Overview

BatchAIManagementClass

Direct Known Subclasses

Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ BatchAIManagementClass

Returns a new instance of BatchAIManagementClass.



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

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::BatchAI::Mgmt::V2018_05_01::BatchAIManagementClient.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
  @usages = @client_0.usages
  @workspaces = @client_0.workspaces
  @experiments = @client_0.experiments
  @jobs = @client_0.jobs
  @file_servers = @client_0.file_servers
  @clusters = @client_0.clusters

  @model_classes = ModelClasses.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



151
152
153
154
155
156
157
# File 'lib/profiles/latest/modules/batchai_profile_module.rb', line 151

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.



115
116
117
# File 'lib/profiles/latest/modules/batchai_profile_module.rb', line 115

def base_url
  @base_url
end

#clustersObject (readonly)

Returns the value of attribute clusters.



115
116
117
# File 'lib/profiles/latest/modules/batchai_profile_module.rb', line 115

def clusters
  @clusters
end

#configurableObject (readonly)

Returns the value of attribute configurable.



115
116
117
# File 'lib/profiles/latest/modules/batchai_profile_module.rb', line 115

def configurable
  @configurable
end

#experimentsObject (readonly)

Returns the value of attribute experiments.



115
116
117
# File 'lib/profiles/latest/modules/batchai_profile_module.rb', line 115

def experiments
  @experiments
end

#file_serversObject (readonly)

Returns the value of attribute file_servers.



115
116
117
# File 'lib/profiles/latest/modules/batchai_profile_module.rb', line 115

def file_servers
  @file_servers
end

#jobsObject (readonly)

Returns the value of attribute jobs.



115
116
117
# File 'lib/profiles/latest/modules/batchai_profile_module.rb', line 115

def jobs
  @jobs
end

#model_classesObject (readonly)

Returns the value of attribute model_classes.



115
116
117
# File 'lib/profiles/latest/modules/batchai_profile_module.rb', line 115

def model_classes
  @model_classes
end

#operationsObject (readonly)

Returns the value of attribute operations.



115
116
117
# File 'lib/profiles/latest/modules/batchai_profile_module.rb', line 115

def operations
  @operations
end

#optionsObject (readonly)

Returns the value of attribute options.



115
116
117
# File 'lib/profiles/latest/modules/batchai_profile_module.rb', line 115

def options
  @options
end

#usagesObject (readonly)

Returns the value of attribute usages.



115
116
117
# File 'lib/profiles/latest/modules/batchai_profile_module.rb', line 115

def usages
  @usages
end

#workspacesObject (readonly)

Returns the value of attribute workspaces.



115
116
117
# File 'lib/profiles/latest/modules/batchai_profile_module.rb', line 115

def workspaces
  @workspaces
end

Instance Method Details

#add_telemetry(client) ⇒ Object



146
147
148
149
# File 'lib/profiles/latest/modules/batchai_profile_module.rb', line 146

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