Class: Azure::StorageCache::Profiles::Latest::Mgmt::StorageCacheManagementClass

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

Overview

StorageCacheManagementClass

Direct Known Subclasses

Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ StorageCacheManagementClass

Returns a new instance of StorageCacheManagementClass.



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/profiles/latest/modules/storagecache_profile_module.rb', line 84

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::StorageCache::Mgmt::V2020_10_01::StorageCacheManagementClient.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
  @skus = @client_0.skus
  @usage_models = @client_0.usage_models
  @asc_operations = @client_0.asc_operations
  @caches = @client_0.caches
  @storage_targets = @client_0.storage_targets

  @model_classes = ModelClasses.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



117
118
119
120
121
122
123
# File 'lib/profiles/latest/modules/storagecache_profile_module.rb', line 117

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

Instance Attribute Details

#asc_operationsObject (readonly)

Returns the value of attribute asc_operations.



82
83
84
# File 'lib/profiles/latest/modules/storagecache_profile_module.rb', line 82

def asc_operations
  @asc_operations
end

#base_urlObject (readonly)

Returns the value of attribute base_url.



82
83
84
# File 'lib/profiles/latest/modules/storagecache_profile_module.rb', line 82

def base_url
  @base_url
end

#cachesObject (readonly)

Returns the value of attribute caches.



82
83
84
# File 'lib/profiles/latest/modules/storagecache_profile_module.rb', line 82

def caches
  @caches
end

#configurableObject (readonly)

Returns the value of attribute configurable.



82
83
84
# File 'lib/profiles/latest/modules/storagecache_profile_module.rb', line 82

def configurable
  @configurable
end

#model_classesObject (readonly)

Returns the value of attribute model_classes.



82
83
84
# File 'lib/profiles/latest/modules/storagecache_profile_module.rb', line 82

def model_classes
  @model_classes
end

#operationsObject (readonly)

Returns the value of attribute operations.



82
83
84
# File 'lib/profiles/latest/modules/storagecache_profile_module.rb', line 82

def operations
  @operations
end

#optionsObject (readonly)

Returns the value of attribute options.



82
83
84
# File 'lib/profiles/latest/modules/storagecache_profile_module.rb', line 82

def options
  @options
end

#skusObject (readonly)

Returns the value of attribute skus.



82
83
84
# File 'lib/profiles/latest/modules/storagecache_profile_module.rb', line 82

def skus
  @skus
end

#storage_targetsObject (readonly)

Returns the value of attribute storage_targets.



82
83
84
# File 'lib/profiles/latest/modules/storagecache_profile_module.rb', line 82

def storage_targets
  @storage_targets
end

#usage_modelsObject (readonly)

Returns the value of attribute usage_models.



82
83
84
# File 'lib/profiles/latest/modules/storagecache_profile_module.rb', line 82

def usage_models
  @usage_models
end

Instance Method Details

#add_telemetry(client) ⇒ Object



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

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