Class: Azure::Profiles::V2020_09_01_Hybrid::IotHub::Mgmt::IotHubManagementClass

Inherits:
Object
  • Object
show all
Defined in:
lib/v2020_09_01_hybrid/modules/iothub_profile_module.rb

Defined Under Namespace

Classes: ModelClasses

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configurable, base_url = nil, options = nil) ⇒ IotHubManagementClass

Returns a new instance of IotHubManagementClass.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/v2020_09_01_hybrid/modules/iothub_profile_module.rb', line 104

def initialize(configurable, base_url=nil, options=nil)
  @configurable, @base_url, @options = configurable, base_url, options

  @client_0 = Azure::IotHub::Mgmt::V2019_07_01_preview::IotHubClient.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
  @iot_hub_resource = @client_0.iot_hub_resource
  @resource_provider_common = @client_0.resource_provider_common
  @certificates = @client_0.certificates
  @iot_hub = @client_0.iot_hub

  @model_classes = ModelClasses.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



126
127
128
129
130
131
132
# File 'lib/v2020_09_01_hybrid/modules/iothub_profile_module.rb', line 126

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.



102
103
104
# File 'lib/v2020_09_01_hybrid/modules/iothub_profile_module.rb', line 102

def base_url
  @base_url
end

#certificatesObject (readonly)

Returns the value of attribute certificates.



102
103
104
# File 'lib/v2020_09_01_hybrid/modules/iothub_profile_module.rb', line 102

def certificates
  @certificates
end

#configurableObject (readonly)

Returns the value of attribute configurable.



102
103
104
# File 'lib/v2020_09_01_hybrid/modules/iothub_profile_module.rb', line 102

def configurable
  @configurable
end

#iot_hubObject (readonly)

Returns the value of attribute iot_hub.



102
103
104
# File 'lib/v2020_09_01_hybrid/modules/iothub_profile_module.rb', line 102

def iot_hub
  @iot_hub
end

#iot_hub_resourceObject (readonly)

Returns the value of attribute iot_hub_resource.



102
103
104
# File 'lib/v2020_09_01_hybrid/modules/iothub_profile_module.rb', line 102

def iot_hub_resource
  @iot_hub_resource
end

#model_classesObject (readonly)

Returns the value of attribute model_classes.



102
103
104
# File 'lib/v2020_09_01_hybrid/modules/iothub_profile_module.rb', line 102

def model_classes
  @model_classes
end

#operationsObject (readonly)

Returns the value of attribute operations.



102
103
104
# File 'lib/v2020_09_01_hybrid/modules/iothub_profile_module.rb', line 102

def operations
  @operations
end

#optionsObject (readonly)

Returns the value of attribute options.



102
103
104
# File 'lib/v2020_09_01_hybrid/modules/iothub_profile_module.rb', line 102

def options
  @options
end

#resource_provider_commonObject (readonly)

Returns the value of attribute resource_provider_common.



102
103
104
# File 'lib/v2020_09_01_hybrid/modules/iothub_profile_module.rb', line 102

def resource_provider_common
  @resource_provider_common
end

Instance Method Details

#add_telemetry(client) ⇒ Object



121
122
123
124
# File 'lib/v2020_09_01_hybrid/modules/iothub_profile_module.rb', line 121

def add_telemetry(client)
  profile_information = "Profiles/azure_sdk/#{Azure::VERSION}/V2020_09_01_Hybrid/IotHub/Mgmt"
  client.add_user_agent_information(profile_information)
end