Class: Azure::Mysql::Profiles::Latest::Mgmt::MysqlManagementClass

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

Overview

MysqlManagementClass

Direct Known Subclasses

Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ MysqlManagementClass

Returns a new instance of MysqlManagementClass.



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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
143
144
145
146
147
148
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 98

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::Mysql::Mgmt::V2017_12_01::MySQLManagementClient.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)
  @replicas = @client_0.replicas
  @firewall_rules = @client_0.firewall_rules
  @virtual_network_rules = @client_0.virtual_network_rules
  @databases = @client_0.databases
  @configurations = @client_0.configurations
  @log_files = @client_0.log_files
  @location_based_performance_tier = @client_0.location_based_performance_tier
  @check_name_availability = @client_0.check_name_availability
  @server_security_alert_policies = @client_0.server_security_alert_policies
  @operations = @client_0.operations

  @client_1 = Azure::Mysql::Mgmt::V2018_06_01::MySQLManagementClient.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)
  @advisors = @client_1.advisors
  @recommended_actions = @client_1.recommended_actions
  @location_based_recommended_action_sessions_operation_status = @client_1.location_based_recommended_action_sessions_operation_status
  @location_based_recommended_action_sessions_result = @client_1.location_based_recommended_action_sessions_result
  @private_endpoint_connections = @client_1.private_endpoint_connections
  @private_link_resources = @client_1.private_link_resources

  @client_2 = Azure::Mysql::Mgmt::V2020_01_01::MySQLManagementClient.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)
  @server_keys = @client_2.server_keys
  @servers = @client_2.servers

  @model_classes = ModelClasses.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



155
156
157
158
159
160
161
162
163
164
165
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 155

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

#advisorsObject (readonly)

Returns the value of attribute advisors.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def advisors
  @advisors
end

#base_urlObject (readonly)

Returns the value of attribute base_url.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def base_url
  @base_url
end

#check_name_availabilityObject (readonly)

Returns the value of attribute check_name_availability.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def check_name_availability
  @check_name_availability
end

#configurableObject (readonly)

Returns the value of attribute configurable.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def configurable
  @configurable
end

#configurationsObject (readonly)

Returns the value of attribute configurations.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def configurations
  @configurations
end

#databasesObject (readonly)

Returns the value of attribute databases.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def databases
  @databases
end

#firewall_rulesObject (readonly)

Returns the value of attribute firewall_rules.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def firewall_rules
  @firewall_rules
end

#location_based_performance_tierObject (readonly)

Returns the value of attribute location_based_performance_tier.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def location_based_performance_tier
  @location_based_performance_tier
end

Returns the value of attribute location_based_recommended_action_sessions_operation_status.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def location_based_recommended_action_sessions_operation_status
  @location_based_recommended_action_sessions_operation_status
end

Returns the value of attribute location_based_recommended_action_sessions_result.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def location_based_recommended_action_sessions_result
  @location_based_recommended_action_sessions_result
end

#log_filesObject (readonly)

Returns the value of attribute log_files.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def log_files
  @log_files
end

#model_classesObject (readonly)

Returns the value of attribute model_classes.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def model_classes
  @model_classes
end

#operationsObject (readonly)

Returns the value of attribute operations.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def operations
  @operations
end

#optionsObject (readonly)

Returns the value of attribute options.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def options
  @options
end

#private_endpoint_connectionsObject (readonly)

Returns the value of attribute private_endpoint_connections.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def private_endpoint_connections
  @private_endpoint_connections
end

Returns the value of attribute private_link_resources.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def private_link_resources
  @private_link_resources
end

Returns the value of attribute recommended_actions.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def recommended_actions
  @recommended_actions
end

#replicasObject (readonly)

Returns the value of attribute replicas.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def replicas
  @replicas
end

#server_keysObject (readonly)

Returns the value of attribute server_keys.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def server_keys
  @server_keys
end

#server_security_alert_policiesObject (readonly)

Returns the value of attribute server_security_alert_policies.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def server_security_alert_policies
  @server_security_alert_policies
end

#serversObject (readonly)

Returns the value of attribute servers.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def servers
  @servers
end

#virtual_network_rulesObject (readonly)

Returns the value of attribute virtual_network_rules.



96
97
98
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 96

def virtual_network_rules
  @virtual_network_rules
end

Instance Method Details

#add_telemetry(client) ⇒ Object



150
151
152
153
# File 'lib/profiles/latest/modules/mysql_profile_module.rb', line 150

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