Class: Apcera::Rule

Inherits:
BaseObject show all
Defined in:
lib/apcera/models/rule.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ Rule

Returns a new instance of Rule.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/apcera/models/rule.rb', line 55

def initialize(attributes = {})
  return if !attributes.is_a?(Hash) || attributes.empty?

  # convert string to symbol for hash key
  attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}

  
  if attributes[:'action']
    self.action = attributes[:'action']
  end
  
  if attributes[:'created_at']
    self.created_at = attributes[:'created_at']
  end
  
  if attributes[:'created_by']
    self.created_by = attributes[:'created_by']
  end
  
  if attributes[:'fqn']
    self.fqn = attributes[:'fqn']
  end
  
  if attributes[:'job']
    self.job = attributes[:'job']
  end
  
  if attributes[:'provider']
    self.provider = attributes[:'provider']
  end
  
  if attributes[:'service']
    self.service = attributes[:'service']
  end
  
  if attributes[:'type']
    self.type = attributes[:'type']
  end
  
  if attributes[:'version_id']
    self.version_id = attributes[:'version_id']
  end
  
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



4
5
6
# File 'lib/apcera/models/rule.rb', line 4

def action
  @action
end

#created_atObject

Returns the value of attribute created_at.



4
5
6
# File 'lib/apcera/models/rule.rb', line 4

def created_at
  @created_at
end

#created_byObject

Returns the value of attribute created_by.



4
5
6
# File 'lib/apcera/models/rule.rb', line 4

def created_by
  @created_by
end

#fqnObject

Returns the value of attribute fqn.



4
5
6
# File 'lib/apcera/models/rule.rb', line 4

def fqn
  @fqn
end

#jobObject

Returns the value of attribute job.



4
5
6
# File 'lib/apcera/models/rule.rb', line 4

def job
  @job
end

#providerObject

Returns the value of attribute provider.



4
5
6
# File 'lib/apcera/models/rule.rb', line 4

def provider
  @provider
end

#serviceObject

Returns the value of attribute service.



4
5
6
# File 'lib/apcera/models/rule.rb', line 4

def service
  @service
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/apcera/models/rule.rb', line 4

def type
  @type
end

#version_idObject

Returns the value of attribute version_id.



4
5
6
# File 'lib/apcera/models/rule.rb', line 4

def version_id
  @version_id
end

Class Method Details

.attribute_mapObject

attribute mapping from ruby-style variable name to JSON key



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/apcera/models/rule.rb', line 6

def self.attribute_map
  {
    
    # The type of action to take when the rule is triggered. Can either by 'hook' or 'notification'.
    :'action' => :'action',
    
    # UNIX timestamp when event rule was created.
    :'created_at' => :'created_at',
    
    # Principal name of user who created the event rule.
    :'created_by' => :'created_by',
    
    # The rule's fully-qualified name against which policy may be enforced.
    :'fqn' => :'fqn',
    
    # FQN of the job to enforce the rule against.
    :'job' => :'job',
    
    # FQN of the provider to enforce this rule against. In only `provider` is populated for this rule, then all semantic pipelines consuming a provider matching this FQN will have the rule enforced against them.
    :'provider' => :'provider',
    
    # FQN of the service to enforce this rule against. If only `service` is populated for this rule, then all semantic pipelines consuming a service matching this FQN will have the rule enforced against them.
    :'service' => :'service',
    
    # Type depends upon specified `action` of event rule, and can specify the timing of the hook firing.
    :'type' => :'type',
    
    # Rule's auto-incremented version number.
    :'version_id' => :'version_id'
    
  }
end

.swagger_typesObject

attribute type



40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/apcera/models/rule.rb', line 40

def self.swagger_types
  {
    :'action' => :'String',
    :'created_at' => :'Float',
    :'created_by' => :'String',
    :'fqn' => :'String',
    :'job' => :'String',
    :'provider' => :'String',
    :'service' => :'String',
    :'type' => :'String',
    :'version_id' => :'Integer'
    
  }
end