Class: Azure::ContainerRegistry::Profiles::Latest::Mgmt::ContainerRegistryManagementClass

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

Overview

ContainerRegistryManagementClass

Direct Known Subclasses

Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ContainerRegistryManagementClass

Returns a new instance of ContainerRegistryManagementClass.



184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/profiles/latest/modules/containerregistry_profile_module.rb', line 184

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::ContainerRegistry::Mgmt::V2019_05_01_preview::ContainerRegistryManagementClient.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)
  @scope_maps = @client_0.scope_maps
  @tokens = @client_0.tokens

  @client_1 = Azure::ContainerRegistry::Mgmt::V2019_05_01::ContainerRegistryManagementClient.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)
  @operations = @client_1.operations
  @replications = @client_1.replications
  @webhooks = @client_1.webhooks

  @client_2 = Azure::ContainerRegistry::Mgmt::V2019_06_01_preview::ContainerRegistryManagementClient.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)
  @agent_pools = @client_2.agent_pools
  @registries = @client_2.registries
  @runs = @client_2.runs
  @task_runs = @client_2.task_runs
  @tasks = @client_2.tasks

  @model_classes = ModelClasses.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



233
234
235
236
237
238
239
240
241
242
243
# File 'lib/profiles/latest/modules/containerregistry_profile_module.rb', line 233

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

#agent_poolsObject (readonly)

Returns the value of attribute agent_pools.



182
183
184
# File 'lib/profiles/latest/modules/containerregistry_profile_module.rb', line 182

def agent_pools
  @agent_pools
end

#base_urlObject (readonly)

Returns the value of attribute base_url.



182
183
184
# File 'lib/profiles/latest/modules/containerregistry_profile_module.rb', line 182

def base_url
  @base_url
end

#configurableObject (readonly)

Returns the value of attribute configurable.



182
183
184
# File 'lib/profiles/latest/modules/containerregistry_profile_module.rb', line 182

def configurable
  @configurable
end

#model_classesObject (readonly)

Returns the value of attribute model_classes.



182
183
184
# File 'lib/profiles/latest/modules/containerregistry_profile_module.rb', line 182

def model_classes
  @model_classes
end

#operationsObject (readonly)

Returns the value of attribute operations.



182
183
184
# File 'lib/profiles/latest/modules/containerregistry_profile_module.rb', line 182

def operations
  @operations
end

#optionsObject (readonly)

Returns the value of attribute options.



182
183
184
# File 'lib/profiles/latest/modules/containerregistry_profile_module.rb', line 182

def options
  @options
end

#registriesObject (readonly)

Returns the value of attribute registries.



182
183
184
# File 'lib/profiles/latest/modules/containerregistry_profile_module.rb', line 182

def registries
  @registries
end

#replicationsObject (readonly)

Returns the value of attribute replications.



182
183
184
# File 'lib/profiles/latest/modules/containerregistry_profile_module.rb', line 182

def replications
  @replications
end

#runsObject (readonly)

Returns the value of attribute runs.



182
183
184
# File 'lib/profiles/latest/modules/containerregistry_profile_module.rb', line 182

def runs
  @runs
end

#scope_mapsObject (readonly)

Returns the value of attribute scope_maps.



182
183
184
# File 'lib/profiles/latest/modules/containerregistry_profile_module.rb', line 182

def scope_maps
  @scope_maps
end

#task_runsObject (readonly)

Returns the value of attribute task_runs.



182
183
184
# File 'lib/profiles/latest/modules/containerregistry_profile_module.rb', line 182

def task_runs
  @task_runs
end

#tasksObject (readonly)

Returns the value of attribute tasks.



182
183
184
# File 'lib/profiles/latest/modules/containerregistry_profile_module.rb', line 182

def tasks
  @tasks
end

#tokensObject (readonly)

Returns the value of attribute tokens.



182
183
184
# File 'lib/profiles/latest/modules/containerregistry_profile_module.rb', line 182

def tokens
  @tokens
end

#webhooksObject (readonly)

Returns the value of attribute webhooks.



182
183
184
# File 'lib/profiles/latest/modules/containerregistry_profile_module.rb', line 182

def webhooks
  @webhooks
end

Instance Method Details

#add_telemetry(client) ⇒ Object



228
229
230
231
# File 'lib/profiles/latest/modules/containerregistry_profile_module.rb', line 228

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