Class: Azure::ServiceBus::SqlRuleAction

Inherits:
Action show all
Defined in:
lib/azure/service_bus/sql_rule_action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RuleAspect

from_hash

Constructor Details

#initialize(hash = nil) ⇒ SqlRuleAction

Public: Initialize the SQL Rule Action.

Attributes

  • hash - The resource options Hash

Options

Accepted key/value pairs in options parameter are:

  • :sql_expression - The SQL expression.

  • :compatibility_level - The compatibility level.



33
34
35
36
37
38
# File 'lib/azure/service_bus/sql_rule_action.rb', line 33

def initialize(hash=nil)
  hash = {} unless hash
  @sql_expression = hash[:sql_expression]
  @compatibility_level = (hash[:compatibility_level] || 20).to_i
  super()
end

Instance Attribute Details

#compatibility_levelObject

Returns the value of attribute compatibility_level.



41
42
43
# File 'lib/azure/service_bus/sql_rule_action.rb', line 41

def compatibility_level
  @compatibility_level
end

#sql_expressionObject

Returns the value of attribute sql_expression.



40
41
42
# File 'lib/azure/service_bus/sql_rule_action.rb', line 40

def sql_expression
  @sql_expression
end

Instance Method Details

#to_hash(hash = {}) ⇒ Object



43
44
45
46
47
# File 'lib/azure/service_bus/sql_rule_action.rb', line 43

def to_hash(hash={})
  hash[:sql_expression]=sql_expression if sql_expression
  hash[:compatibility_level]=compatibility_level.to_s if compatibility_level
  super(hash)
end